Reply to Re: upload multi images in laravel

Re: upload multi images in laravel new!
by colin, 1 year, 3 months ago
The code you are using is for vanilla PHP uploads. If you are using Laravel, you should do something like:
if($request->hasFile('file')) {
  $files = $request->file('file');
  foreach ($files as $file) {
    $filename = $file->getClientOriginalName();
    $handle = new Upload($filename);
    // ....
  }
}
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important