Docs Essentials
CSRF Protection
Laravel has built-in CSRF protection in place. It prevents our app from processing any non-GET request that doesn't include a valid CSRF token generated by our backend.
So, to allow a POST form to be processed, we usually need to add a @csrf Blade directive to our forms:
<form action="{{ route('chirps.store') }}" method="post">
@csrf
<!-- ... -->
</form>
Since Turbo.js intercepts form submissions and converts them to fetch requests (AJAX), we don't actually need to add the @csrf token to each form. Turbo is smart enough to read our page's meta tags, look for one named csrf-token, and use its contents to add the token to all form submissions it intercepts. Jetstream and Breeze both ship with this element in their layout files, but in case it's missing from your views, it should look like this:
<meta name="csrf-token" content="{{ csrf_token() }}">
That being said, you may still want to use the @csrf Blade directive to support users with JavaScript disabled, since forms that contain the CSRF token will still work without Turbo.