category qosishsh to'g'irlandi
This commit is contained in:
@@ -147,6 +147,10 @@ class Category extends Model
|
||||
public function getImage(): string
|
||||
{
|
||||
if (!in_array($this->image, ['null', null])) {
|
||||
if (Str::startsWith($this->image, 'uploads/categories/')) {
|
||||
return asset($this->image);
|
||||
}
|
||||
|
||||
return Storage::url($this->image);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user