check your web.php ... where you have all your routes.
MAYBE ... there is a route expression that matchs the route you expect to have a 404, and is processed before.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
If I make a POST request to mysite.com/thispagedoesnotexist I expect to get a 404 error, but instead I get a 500 error with a TokenMismatchException, which gets logged as an error. It appears that most of these requests are hack attempts for wordpress sites, so I'd prefer to have them show up as 404 errors and just ignore them. As is, it's impossible to see if there are any TokenMismatchException's that I care about through all the noise.
Any idea of why this is happening and how to fix it?
Using Laravel version 5.1.7
Thanks!
Please or to participate in this conversation.