title: In Laravel what is the best method to save or store data in database
body: <p>For usual Form like the following form I use the following technique to save data into database. </p>
  
  <p>// Controller </p>
  
  <pre><code>public function store()
      {
          $validator = Validator::make($data = Input::all(), Person::$rules);
          if ($validator-&gt;fails())
          {
              return Redirect::back()-&gt;withErrors($validator)-&gt;withInput();
          }
  
          Person::create($data);
          return Redirect::route('admin.person.index');
      }
  </code></pre>
  
  <p>But in my this form there is an file input field where user can upload multiple files at a time. and I want to store the files name into database i,e 
  image-1, image-2, image-3 like this. I am trying to use image intervention package to handle image files. But in that case what would my code to store data into database.</p>
  
  <p>// Form</p>
  
  <pre><code>{{ Form::open(array('route' =&gt; array('admin.index.store'), 'method' =&gt; 'post', 'files' =&gt; true)) }}
  
      &lt;li&gt;
            {{ Form::label('name', 'Index Name') }}
            {{ Form::text('name', null, array( 'class' =&gt; 'form-control input-sm', 'placeholder' =&gt; 'Name' )) }}
            {{ $errors-&gt;first('name', '&lt;p class="error"&gt;:message&lt;/p&gt;' ) }}
      &lt;/li&gt;
  
  
      &lt;li&gt;
            {{ Form::label('phone_number', 'Phone Number') }}
            {{ Form::text('phone_number', null, array( 'class' =&gt; 'form-control input-sm', 'placeholder' =&gt; 'Phone Number' )) }} 
            {{ $errors-&gt;first('phone_number', '&lt;p class="error"&gt;:message&lt;/p&gt;' ) }}
      &lt;/li&gt;
  
  
      &lt;li&gt;
             {{ Form::label('image', 'Profile Picture') }}
             {{ Form::file('files[]', array('id' =&gt; 'files', 'multiple' =&gt; true)); }}
  
      &lt;/li&gt;
  {{ Form::close() }}
  </code></pre>