title: How to post data, and insert it to the database with Laravel?
body: <p>I have a controller file, which handles retrieving and inserting data to database: </p>
  
  <pre><code>namespace App\Http\Controllers;
  
  use App\Dream;
  use Illuminate\Http\Request;
  use Illuminate\Routing\Controller;
  
  class DreamsController extends Controller
  {
      public function submit(Request $request) {
          $dreamEntry = new Dream();
          $dreamEntry-&gt;dream = $request-&gt;input('dream');
          $dreamEntry-&gt;save();
          return redirect('/')-&gt;with('status', 'INSERTED');
      }
  }
  </code></pre>
  
  <p>I have this class, for the dreams:</p>
  
  <pre><code>class Dream extends Model
  {
      use Notifiable;
  
      protected $fillable = [
          'dream'
      ];
  }
  </code></pre>
  
  <p>A route in my web.php file:</p>
  
  <pre><code>Route::post('upload/submit', array('dream'=&gt;'DreamController@submit'));
  </code></pre>
  
  <p>And a really simple form:</p>
  
  <pre><code>&lt;form action="/upload/submit" method="post"&gt;
      &lt;textarea&gt;&lt;/textarea&gt;
      &lt;button type="submit"&gt;SUBMIT&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Getting data out from the database works fine, and I can see my <code>submit</code> function running, because at the and I see the URL at the root (/), but I'm getting <code>error 419</code> What is wrong with the previous code? </p>