storage url o'zgartirildi
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Requests\Dashboard\Category;
|
||||
|
||||
use App\Models\Category;
|
||||
use App\Support\Uploads;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
@@ -44,7 +45,7 @@ class Update extends FormRequest
|
||||
{
|
||||
if ($this->hasFile('image')) {
|
||||
Storage::delete($category->image);
|
||||
return (string) $this->file('image')->store('uploads/categories');
|
||||
return Uploads::store($this->file('image'), 'uploads/categories');
|
||||
}
|
||||
|
||||
return $category->image;
|
||||
|
||||
Reference in New Issue
Block a user