处理程序文件中的Laravel dontReport无法正常工作,遵循dontReport的代码
protected $dontReport = [
Illuminate\Auth\AuthenticationException::class,
Illuminate\Auth\Access\AuthorizationException::class,
Symfony\Component\HttpKernel\Exception\HttpException::class,
Illuminate\Database\Eloquent\ModelNotFoundException::class,
Illuminate\Session\TokenMismatchException::class,
Illuminate\Validation\ValidationException::class,
Illuminate\View\View::class,
Illuminate\Routing\RouteCollection::class,
Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class,
Illuminate\Session\Middleware\StartSession::class,
];
答案 0 :(得分:0)
尝试在您的report
方法中添加以下代码:
if($this->shouldReport($exception) {
// Send email
}
您还可以考虑检查您的环境以及在相同的if语句中是否存在异常消息。