Level 1
do you use enctype in your method POST?
enctype="multipart/form-data">
Hi, how can I upload multiple images at once? I have this script so far
if ($request->hasFile('images'))
{
$postImages->images = $request->file('images');
$name = time() . '.' . $postImages->images->getClientOriginalExtension();
$destinationPath = public_path('/uploads/images');
$postImages->images->move($destinationPath, $name);
}
$postImages->save();
view
<div class="images-group-uploader">
<input type="file" id="groupImages" name="images" m multiple="true" accept="image/png, image/jpeg" />
<label for="groupImages" class="general-btn positive-btn">
<span> Upload </span>
<i class="fad fa-upload"></i>
</label>
</div>
Please or to participate in this conversation.