🆙 Fix cms as now on epicnabbo.nl 🆙

This commit is contained in:
Remco
2026-01-07 19:42:55 +01:00
parent dc418a51a1
commit 6bf99066a5
22 changed files with 142 additions and 27 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ class WebsiteAd extends Model
protected function imageUrl(): \Illuminate\Database\Eloquent\Casts\Attribute
{
return \Illuminate\Database\Eloquent\Casts\Attribute::make(get: function () {
$settingsService = app(SettingsService::class);
$settingsService = resolve(SettingsService::class);
$adsPicturePath = Cache::remember('ads_picture_path', 3600, fn () => $settingsService->getOrDefault('ads_picture_path'));
if (! str_starts_with((string) $adsPicturePath, 'http')) {
$adsPicturePath = rtrim((string) config('app.url'), '/') . '/' . ltrim((string) $adsPicturePath, '/');
@@ -56,7 +56,7 @@ class WebsiteAd extends Model
protected function configureAdsDisk(): void
{
$settingsService = app(SettingsService::class);
$settingsService = resolve(SettingsService::class);
$adsPath = Cache::remember('ads_path_filesystem', 3600, fn () => $settingsService->getOrDefault('ads_path_filesystem'));