Laravel 5 Send Errors to Email

前端 未结 9 648
野的像风
野的像风 2021-02-03 10:45

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: http

9条回答
  •  执念已碎
    2021-02-03 10:58

    The other answers seem quite right. We have done this a while ago and found one big issue with this: If the mail command fails, it can result in a infinite loop of throwing an error and trying to send the according email which will result in a failure again... This will fill up the log quite quickly and kill your server.

    Bear this in mind and don't send an email in that case.

    Side Note: I decided to put this in the answer because it is relevant to all answers and should not get hidden in one comment.

提交回复
热议问题