Laravel: Avoid Try-Catch In Every Method (What To Do Instead)

I want to show you a non-ideal try-catch-exception approach some developers take and how to globally override the exceptions in the Laravel exception handler.

Links mentioned in the video:
– The original Laracasts topic: https://laracasts.com/discuss/channels/design/can-i-move-trycatch-blocks-out-of-controller
– Laravel Docs for Error Handling: https://laravel.com/docs/10.x/errors#rendering-exceptions
– Our course “Handling Exceptions and Errors in Laravel”: https://laraveldaily.com/course/exceptions-errors-laravel

– – – – –
Support the channel by checking out my products:
– My Laravel courses: https://laraveldaily.com/courses
– Laravel QuickAdminPanel: https://quickadminpanel.com
– Livewire Kit Components: https://livewirekit.com

– – – – –
Other places to follow:
– My weekly Laravel newsletter: https://us11.campaign-archive.com/home/?u=a459401212599a54203d036ee&id=91c1337873
– My personal Twitter: https://twitter.com/povilaskorop

Source: https://www.youtube.com/watch?v=eTOScyTCkiY

Leave a Reply

Your email address will not be published. Required fields are marked *