@tudosm take a look at this section on the docs:
https://laravel.com/docs/7.x/errors#the-exception-handler
There you can configure the behavior of your app when some exception is thrown.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi all,
Would anyone be able to help me with error handling process.
How can I send the user back or to a specific page if an error was thrown (any kind of error in controller).
Fo example sometimes I have students with degree level set sometimes not and instead of blowing up my app I want to safely sent the user back to home page. What would be the best case except checking if user has a degree level in controller ...etc
thank you very much !
@tudosm take a look at this section on the docs:
https://laravel.com/docs/7.x/errors#the-exception-handler
There you can configure the behavior of your app when some exception is thrown.
Please or to participate in this conversation.