Has it updated the CsrfMiddleware in your app? It should look like so now:
https://github.com/laravel/laravel/blob/develop/app/Http/Middleware/CsrfMiddleware.php
This will avoid throwing a TokenMismatchException on GET routes.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi guys, on this commit https://github.com/laravel/laravel/commit/c0019c6fcb552f533607a6737688a1bcdecb2873 the CSRF token middleware has been inserted to the main stack, so now every time I visit a route I get the error Illuminate \ Session \ TokenMismatchException on Get routes as well.
How can I handle that? Should I always explicitly write the except=csrf for all my routes?
Has it updated the CsrfMiddleware in your app? It should look like so now:
https://github.com/laravel/laravel/blob/develop/app/Http/Middleware/CsrfMiddleware.php
This will avoid throwing a TokenMismatchException on GET routes.
Please or to participate in this conversation.