title: Why does the Laravel API return a 419 status code on POST and PUT methods?
body: <p>I am trying to create a RESTful API by using Laravel. I have created my controller using <strong>php artisan make:controller RestController</strong> and this is my controller code: </p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  
  class RestController extends Controller
  {
      private $arr = array(
              array("name"=&gt;"jon", "family"=&gt;"doe"),
              array("name"=&gt;"jhon", "family" =&gt; "doue")
          );
      public function index(){
          return json_encode($this-&gt;arr);
      }
  
      public function store(Request $request){
          return "oops!!";
      }
  
      public function update (Request $request, $id){
          return "test";
      }
  
  }
  </code></pre>
  
  <p>I have added this line of code to create this route in my routes/web.php file: </p>
  
  <pre><code>Route::resource('person', 'RestController');
  </code></pre>
  
  <p>When I try to test this api on GET /person it works fine but on POST and PUT I am getting a 419 status code from Laravel.</p>