Currently I have single upload of image using Laravel Passport API
I have this code and it's working fine.
//Saves file to public folder
$dateTime = date('Ymd_His');
$file = $request->file('file');
$fileName = $dateTime . '-' . $file->getClientOriginalName();
$savePath = public_path('/upload/img/');
$file->move($savePath, $fileName);
//This saves the current file path of image to mytable
$ActivityLog = new ActivityLogImg;
$ActivityLog->actCode = $activity_code;
$ActivityLog->projCode = $request->projCode;
$ActivityLog->attachment = "/upload/img/".$fileName;
$ActivityLog->type = "IMAGE";
$ActivityLog->deleted = 0;
$ActivityLog->created_by_id = Auth::user()->company_id;
$ActivityLog->created_by_name = Auth::user()->name;
$ActivityLog->created_at = now();
$ActivityLog->updated_at = now();
$ActivityLog->save();
return response([
"status"=>"ok",
"message"=>"Activity successfully submitted!"
]);
and I have this postman request to test the api and it's working fine
Now I'm trying to do multiple upload of image in one single request. Is that possible for this code?

foreach($request->file('file') as $file)might be enough. In postman you can name the inputs asfile[]insteadfile