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