Reputation: 7
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
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