Reply to Re: upload multi images in laravel

Re: upload multi images in laravel new!
by Ethar Shrouf, 1 year, 3 months ago
i use laravel , ajax to multi upload file,
but there is an error message: "Invalid argument supplied for foreach()"
when i use dd($request->file; its print file name successfully
public function upload(Request $request) {
  $files = array();
  foreach ($f as $k => $l) {
     foreach ($l as $i => $v) {
       if (!array_key_exists($i, $files))
        $files[$i] = array();
      $files[$i][$k] = $v;

Your reply

Name *
Title *
Text *
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