Reputation: 581
Is there any way in Laravel 5.2 to disable csrf protection for all routes without using VerifyCsrfToken middelware and $except[] array?
Upvotes: 3
Views: 5701
Reputation: 17658
In your App\Http\Middleware\VerifyCsrfToken
class add the following code:
protected $except = [
'*',
];
Upvotes: 10
Reputation: 163748
Remove or comment out this line in app\Http\Kernel.php
:
\App\Http\Middleware\VerifyCsrfToken::class,
Upvotes: 9