This commit is contained in:
2026-04-15 23:34:01 +05:00
parent 17c7a84f71
commit 61e685b3ce
22 changed files with 38 additions and 17 deletions

View File

@@ -53,7 +53,7 @@ class Category extends Model
'title_seo' => 'array',
'is_filter_power' => 'boolean'
];
protected $appends = ['image_url'];
protected $hidden = [
@@ -148,7 +148,10 @@ class Category extends Model
{
if (!in_array($this->image, ['null', null])) {
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
return Storage::url($this->image);
return Storage::temporaryUrl(
$this->image,
Date::now()->addMinutes(5)
);
}
return config('app.url') . '/' . $this->image;