How to disable CSRF Token in Laravel and why we have to disable it?

 


You can Disable CSRF on few routes by editing.

App\Http\Middleware\VerifyCsrfToken 

and add your own routes name in protected 

Disable for all routes

protected $except = [
    '*',
];

Disable for some routes

 protected $except = [
    'mobile/*',
    'news/articles',
];

Comments

Post a Comment

Popular posts from this blog

Frequently asked: Vue.JS Interview Questions and Answers

Base URL Setting in Codeigniter

How To Secure Apache with Let's Encrypt on Ubuntu (Digital Ocean)