This commit is contained in:
2026-04-15 20:12:12 +05:00
parent 9e82ebc07e
commit d7ec26d246
5 changed files with 14 additions and 14 deletions

View File

@@ -147,17 +147,17 @@ class Category extends Model
public function getImage(): string
{
if (!in_array($this->image, ['null', null])) {
if (in_array(env('FILESYSTEM_DISK'), ['s3', 'minio'])) {
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
return Storage::temporaryUrl(
$this->image,
Date::now()->addMinutes(5)
);
}
return env('APP_URL') . '/' . $this->image;
return config('app.url') . '/' . $this->image;
}
return env('APP_URL') . '/images/nophoto.jpg';
return config('app.url') . '/images/nophoto.jpg';
}
public function getParentId(): int