Skip to content
Advertisement

Laravel 5 Send Errors to Email

I am trying to figure out how I can send errors to my email in Laravel 5. I haven’t had much luck finding any good resources.

There used to be good packages like: https://github.com/TheMonkeys/laravel-error-emailer That did this for you in Laravel 4.

They have yet to release a Laravel5 update because of the way they changed error handling… which I am also not to familiar with.

I have a few Laravel 5 applications which I need to monitor but I need a more efficient way of doing it besides checking error logs on storage.

Any help would be greatly appreciated. I know there are others out there seeking this information as well.

Advertisement

Answer

You can do this by catching all the errors in the AppExceptionsHandler::report(). So in you App/Exceptions/Handler.php add a report function if its not already there.

JavaScript

If you need more info, refer to laravel documentation form mailer and errors.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement