You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 Fixed and no bugs anymore 🆙
This commit is contained in:
@@ -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'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user