Laravel - CSRF Protection - Csrf X Xsrf Token
Laravel stores the current CSRF token in an encrypted XSRF-TOKEN
cookie that is included with each response generated by the framework. You can use the cookie value to set the X-XSRF-TOKEN
request header.
This cookie is primarily sent as a developer convenience since some JavaScript frameworks and libraries, like Angular and Axios, automatically place its value in the X-XSRF-TOKEN
header on same-origin requests.
By default, theresources/js/bootstrap.js
file includes the Axios HTTP library which will automatically send theX-XSRF-TOKEN
header for you.