diff options
author | Mateja <mail@matejamaric.com> | 2020-11-07 13:28:13 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2020-11-07 13:28:13 +0100 |
commit | b74cd28337d9774e37e0dbc8e541ea9026c6d7f7 (patch) | |
tree | 56b1e90069e1a1d37bda8e2697252c3dfca7a02a /app | |
parent | 5bdda7444013a0f9d87831daf29760a42ea29ee8 (diff) | |
download | yota-laravel-b74cd28337d9774e37e0dbc8e541ea9026c6d7f7.tar.gz yota-laravel-b74cd28337d9774e37e0dbc8e541ea9026c6d7f7.zip |
Fixed gallery delete...
Diffstat (limited to 'app')
-rw-r--r-- | app/Http/Controllers/GalleryController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Http/Controllers/GalleryController.php b/app/Http/Controllers/GalleryController.php index d2a04c5..8022ea0 100644 --- a/app/Http/Controllers/GalleryController.php +++ b/app/Http/Controllers/GalleryController.php @@ -50,7 +50,7 @@ class GalleryController extends Controller foreach ($images as $image) { $path = 'imgs/'; $name = time() . '.' . uniqid() . '.' . $image->getClientOriginalExtension(); - $image->move($path, $name); + $image->storeAs($path, $name, 'public'); $save = new Image(); $save->path = $path; @@ -105,8 +105,8 @@ class GalleryController extends Controller { $img = Image::findOrFail($id); $path = $img->path . $img->name; - Storage::delete($path); $img->delete(); + Storage::disk('public')->delete($path); return Redirect::back()->with('status', 'Image deleted.'); } } |