Is it possible to disable CSRF protection in Laravel 11? If so, is it recommended?

Question

Grade: Education Subject: Support
Is it possible to disable CSRF protection in Laravel 11? If so, is it recommended?
Asked by:
82 Viewed 82 Answers

Answer (82)

Best Answer
(264)
Yes, you can disable CSRF protection by adding the `without_csrf` middleware to a route. However, it's **strongly discouraged** unless you have a very specific and well-understood reason. Disabling CSRF protection makes your application vulnerable to CSRF attacks.