title: Saving multiple images in laravel
body: <p>I'm trying to save multiple images in an array to the database, but I'm struggling with that. I've managed to be able to upload the multiple images to the folder just not the database.</p>
  
  <p>My controller</p>
  
  <pre><code>public function store(Request $request)
  {
  
      $content = new Content();
  
      $request-&gt;validate($this-&gt;getRules());
  
      $content-&gt;fill($this-&gt;getSafeInput($request));
  
      if($request-&gt;hasFile('image'))
      {
          foreach($request-&gt;file('image') as $image)
          {
              $destinationPath = 'content_images/';
              $filename = $image-&gt;getClientOriginalName();
              $image-&gt;move($destinationPath, $filename);
              $content-&gt;image = $filename;
  
          }
  
      }
  
      $content-&gt;save();
  
      return redirect()-&gt;route('content.index');
  }
  </code></pre>
  
  <p>My form</p>
  
  <pre><code>&lt;div class="content-form"&gt;
      {{ Form::open(array('route' =&gt; 'content.store', 'method' =&gt; 'post','files'=&gt;'true' )) }}
          {{ csrf_field() }}
  
          &lt;div class="form-group"&gt;
              &lt;label for="title"&gt;Title&lt;/label&gt;
              &lt;input type="text" id="title" class="form-control" name="title"&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              &lt;input type="file" name="image[]" multiple="multiple"&gt;
          &lt;/div&gt;
  
          &lt;input type="submit" class="btn btn-primary" value="Submit"&gt;&lt;/input&gt;
      {{ Form::close() }}
  &lt;/div&gt;
  </code></pre>