mirror of
https://github.com/10h30/Test-Laravel-File-Upload.git
synced 2026-06-05 15:07:47 +09:00
Completed all tasks
This commit is contained in:
@@ -15,6 +15,9 @@ class ShopController extends Controller
|
||||
// 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 = Image::make(storage_path('app/shops/' . $filename));
|
||||
$image->resize(500, 500);
|
||||
$image->save(storage_path('app/shops/resized-' . $filename));
|
||||
|
||||
return 'Success';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user