🆙 More fixes 🆙

This commit is contained in:
Remco
2026-01-19 20:51:21 +01:00
parent 93d3067306
commit 9ed12c2b1c
3 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -29,7 +29,9 @@ class WebsiteAd extends Model
$adsPicturePath = Cache::remember('ads_picture_path', 3600, fn () => $settingsService->getOrDefault('ads_picture_path'));
if (! str_starts_with($adsPicturePath, 'http')) {
$adsPicturePath = rtrim(strval(config('app.url') ?? ''), '/') . '/' . ltrim($adsPicturePath, '/');
$appUrl = config('app.url');
$appUrl = is_string($appUrl) ? $appUrl : '';
$adsPicturePath = rtrim($appUrl, '/') . '/' . ltrim($adsPicturePath, '/');
}
return rtrim($adsPicturePath, '/') . '/' . $this->image;
});