cliffon dmello
cliffon dmello

Reputation: 7

TokenMismatch exception while using post in laravel 5.3 api(used postman chrome extension to test)

 public function store()
    {
        $input=\Input::all();
        $bear=Bear::create($input);
        return $bear;
   }

This is my code for inserting data that will be taken from user,for this I used postman chrome extension.

Upvotes: 0

Views: 116

Answers (1)

Rocco Milluzzo
Rocco Milluzzo

Reputation: 1007

If you're making an API call make sure to add the endpoint URL to your Middleware app/Http/Middleware/VerifyCsrfToken.php

protected $except_urls = [
        '/store',
    ];

replace "store" with your own endpoint

Upvotes: 1

Related Questions