I am new in laravel. I want to create REST API's with Laravel, I have used Dingo for it. Now my problem is when I am sending post request
CSRF token mismatch is error is throwing
and for web version we have used CSRF token for validating the request..
can anyone help me for solving CSRF token mismatch error in laravel 5.1.
Thanks in advance...
In your app\http\Middleware\VerifyCsrfToken.php
file.
edit $except
property with:
protected $except = [
'yourapi/*'
];
This will exclude your api routes from CSRF verification.And keep it up for other things like your frontend.