🆙 Fixed and no bugs anymore 🆙

This commit is contained in:
Remco
2026-01-07 20:01:53 +01:00
parent 6bf99066a5
commit 65ea6c167f
34 changed files with 63 additions and 63 deletions
+2 -3
View File
@@ -20,12 +20,11 @@ class WebsiteAd extends Model
protected function imageUrl(): \Illuminate\Database\Eloquent\Casts\Attribute
{
return \Illuminate\Database\Eloquent\Casts\Attribute::make(get: function () {
$settingsService = resolve(SettingsService::class);
$settingsService = app(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, '/');
}
return rtrim((string) $adsPicturePath, '/') . '/' . $this->image;
});
}
@@ -56,7 +55,7 @@ class WebsiteAd extends Model
protected function configureAdsDisk(): void
{
$settingsService = resolve(SettingsService::class);
$settingsService = app(SettingsService::class);
$adsPath = Cache::remember('ads_path_filesystem', 3600, fn () => $settingsService->getOrDefault('ads_path_filesystem'));