Handler.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace App\Exceptions;
  3. use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
  4. use Throwable;
  5. class Handler extends ExceptionHandler
  6. {
  7. /**
  8. * A list of the exception types that are not reported.
  9. *
  10. * @var array
  11. */
  12. protected $dontReport = [
  13. //
  14. ];
  15. /**
  16. * A list of the inputs that are never flashed for validation exceptions.
  17. *
  18. * @var array
  19. */
  20. protected $dontFlash = [
  21. 'current_password',
  22. 'password',
  23. 'password_confirmation',
  24. ];
  25. /**
  26. * Register the exception handling callbacks for the application.
  27. *
  28. * @return void
  29. */
  30. public function register()
  31. {
  32. $this->reportable(function (Throwable $e) {
  33. //
  34. });
  35. }
  36. // public function render($request, Throwable $e)
  37. // {
  38. // if($this->isHttpException($e))
  39. // {
  40. // if ($request->is('customer-products/admin')) {
  41. // return redirect()->guest('new-page');
  42. // }
  43. // switch ($e->getStatusCode()) {
  44. // // not found
  45. // case 404:
  46. // return parent::render($request, $e);
  47. // break;
  48. // }
  49. // }
  50. // else
  51. // {
  52. // return parent::render($request, $e);
  53. // }
  54. // }
  55. }