From 9f5aee5ebce0f87a0f61929b80ee64f64716b2d5 Mon Sep 17 00:00:00 2001 From: OhmygoodR <109280933+OhmygoodR@users.noreply.github.com> Date: Sat, 30 Mar 2024 23:25:28 +0800 Subject: [PATCH] Update ShopController.php --- app/Http/Controllers/ShopController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/ShopController.php b/app/Http/Controllers/ShopController.php index b2c485a3..32850f16 100644 --- a/app/Http/Controllers/ShopController.php +++ b/app/Http/Controllers/ShopController.php @@ -15,6 +15,7 @@ public function store(Request $request) // TASK: resize the uploaded image from /storage/app/shops/$filename // to size of 500x500 and store it as /storage/app/shops/resized-$filename // Use intervention/image package, it's already pre-installed for you + Image::make(storage_path('app/shops/'.$filename))->resize(500,500)->save(storage_path('app/shops/resized-'.$filename)); return 'Success'; }