简体   繁体   English

Laravel错误-发送通知

[英]Laravel Error - Send notification

is there any ways to handle error event (etc. send email, notification to webmaster) whenever a person encounter the error page (Whoops, looks like something wrong) in the system? 每当有人在系统中遇到错误页面(哇,看起来好像是错误的东西)时,有什么方法可以处理错误事件(例如,向网站管理员发送电子邮件,通知)? Thanks 谢谢

There is a error log file 没有错误日志文件

storage/logs/laravel.log

Open it with any Text editor and you can find all error logs. 使用任何文本编辑器打开它,您可以找到所有错误日志。

If are trying to handle errors and exceptions caused to due some mistake in code you should refer this page . 如果试图处理由于代码中的某些错误而导致的错误和异常,则应参阅此页面
But if you are looking to make custom pages to handle specific error codes like 302,404,403 then you just have to make an html/php page displaying what you want just save it by the error code name for which you have made that page for. 但是,如果您要制作自定义页面来处理诸如302,404,403之类的特定错误代码,则只需制作一个html / php页面,以显示您想要的内容,只需将其保存为该页面的错误代码名称即可。
For ex. 对于前。 404.php, 403.php 404.php,403.php
Save this files under views/errors/ 将此文件保存在views/errors/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM