> */ protected $dontReport = []; /** * A list of the inputs that are never flashed for validation exceptions. * * @var array */ protected $dontFlash = [ 'password', 'password_confirmation', ]; /** * Report or log an exception. * * @param \Throwable $e * @return void * * @phpcs:ignore Squiz.Commenting.FunctionComment.EmptyThrows * @throws \Exception */ public function report(\Throwable $e) { // phpcs:enable if (get_class($e) == RedirectTo::class) { abort(redirect($e->url)); } if ($this->shouldntReport($e)) { return; } parent::report($e); } /** * Register the exception handling callbacks for the application. * * @return void */ public function register() { $this->reportable(function (\Throwable $e) { if (app()->bound('sentry')) { app('sentry')->captureException($e); } }); } }