aboutsummaryrefslogtreecommitdiff
path: root/app/Http/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/Http/Controllers')
-rw-r--r--app/Http/Controllers/GalleryController.php4
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.');
}
}