title: Upload CSV file and import it to database using Laravel
body: <p>I have this method that uploads a file of a CSV format, but now i want to know how to upload it into columns in my database.</p>
  
  <p>My method:</p>
  
  <pre><code> public function postUpload ()
  {
      if (Input::hasFile('file')){
  
          $file = Input::file('file');
          $name = time() . '-' . $file-&gt;getClientOriginalName();
          // Moves file to folder on server
          $file-&gt;move(public_path() . '/uploads/CSV', $name);
  
  
          return 'Ok'; // return for testing
  
       }
  }
  </code></pre>
  
  <p>So my question would be within this method how can i can put it into the database ?</p>