Personal I have the code below in Laravel that saves a single image and works correctly. But I would like to save multiple images that come from an input that looks like name: "name []" multiple. I think I would need a for but I could not get it to work.
public function store(Request $request)
{
$input = $request->all();
$modality = new Modality($input);
$modality->save();
$image = $request->image; //Array de imagens
$imageName = $image->getClientOriginalName();
$image = new Image();
$image->name = $imageName;
$image->imageable_id = $modality->id;
$image->imageable_type = Modality::class;
$path = $request->file('image')->storeAs('public', $imageName);
$image->save();
return redirect()->action('ModalityController@index');
}