storage url o'zgartirildi
This commit is contained in:
@@ -40,14 +40,14 @@ class Update extends FormRequest
|
||||
return Str::slug($this->get('name')['uz']);
|
||||
}
|
||||
|
||||
public function getImage(Category $category): string
|
||||
public function getImage(Category $category): ?string
|
||||
{
|
||||
if ($this->hasFile('image')) {
|
||||
Storage::delete($category->image);
|
||||
return (string) $this->file('image')->store('uploads/categories');
|
||||
} else {
|
||||
return 'null';
|
||||
}
|
||||
|
||||
return $category->image;
|
||||
}
|
||||
|
||||
public function getFilterPower()
|
||||
|
||||
Reference in New Issue
Block a user