Handler.php 609 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Exceptions;
  3. use Exception;
  4. use Illuminate\Validation\ValidationException;
  5. use Illuminate\Auth\Access\AuthorizationException;
  6. use Illuminate\Database\Eloquent\ModelNotFoundException;
  7. use Symfony\Component\HttpKernel\Exception\HttpException;
  8. use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
  9. class Handler extends ExceptionHandler
  10. {
  11. public function render($request, Exception $e)
  12. {
  13. if($e instanceof NotFoundHttpException)
  14. {
  15. return response()->view('errors.test');
  16. }
  17. return parent::render($request, $e);
  18. }
  19. }