Two way to upload file in Laravel
In the controller as an example ImageUploadController.php,
in function you can upload images in 2 ways,
$fileName = 'image_'.time()."_".$request->file('image')->getClientOriginalName();
// One -------------------------------------------------------
Storage::disk('public')->put('image/'.$fileName , file_get_contents($request->file('image')));
// For S3
Storage::disk('s3')->put('image/'.$fileName , file_get_contents($request->file('image')));
// Two -------------------------------------------------------
$request->file('image')->storeAs('image/category/', $fileName, 'public')
// For S3
$request->file('image')->storeAs('image/category/', $fileName, 's3')