Laravel : Upload multiple image but First image only uploaded
<p>I am using Laravel 4.2 and I have this form to upload multiple images </p>

<p>the problem when I submit the form it returns to the view page and the first image only uploaded.</p>

<p>can anyone please review my code and correct my mistake </p>

<pre><code>{{ Form::open(array('url'=&gt;'doAddProjectImage', 'files'=&gt;'true', 'method'=&gt;'PUT', 'class'=&gt;'margin-top-30 width-100per pull-left')) }}
  {{ Form::file('img[]', array('class'=&gt;'file', 'multiple'=&gt;true)) }}
  {{ Form::submit('Add images to project', array('class'=&gt;'btn-success btn pull-left')) }}
  {{ Form::hidden('pid', Session::get('insId')) }}
  {{ Form::close() }}
</code></pre>

<p>and this is my controller</p>

<pre><code>public function doAddProjectImage()
    {
        $proId = Input::get('pid');

        $projectImages = new ProjectsImages();
        $files = Input::file('img');
        foreach($files as $file) {
            $destination_path = 'images/projects/';
            $filename = str_random(6) . '_' . $file-&gt;getClientOriginalName();
            $file-&gt;move($destination_path, $filename);

            $projectImages-&gt;image = $filename;
            $projectImages-&gt;image_id = $proId;
            $projectImages-&gt;save();
        }

        return Redirect::to('admin/view-project');
    }
</code></pre>