Protection of CSRF in Laravel

What is CSRF?

CSRF stands for Cross Site Request Forgery and it’s a web attack that forces a user to make unintended requests to a web application where they are previously authenticated.


CSRF is implemented within HTML forms declared inside the web applications. You have to include a hidden validated CSRF token in the form so that the CSRF protection middleware of Laravel can validate the request. The syntax is shown below.