app/Exceptions/Handler.php
/**
     * Render an exception into an HTTP response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Throwable  $exception
     * @return \Illuminate\Http\Response
     * @throws Throwable
     */
Render an exception into an HTTP response.
Render an exception into an HTTP response .
public function render($request, Throwable $exception)
    {
        if ($exception instanceof NotFoundHttpException)
        {
            return response()->view("errors.404");
        }
        if ($exception instanceof AuthorizationException)
        {
            return response()->view("errors.403")->setStatusCode(403);
        }
        return parent::render($request, $exception);
    }
public function render ( $ request , Throwable $ exception ) { if ( $ exception instanceof NotFoundHttpException ) { return response ( ) -> view ( " errors.404 " ) ; } if ( $ exception instanceof AuthorizationException ) { return response ( ) -> view ( " errors.403 " ) -> setStatusCode ( 403 ) ; } return parent :: render ( $ request , $ exception ) ; }
Render an exception into an HTTP response.
Render an exception into an HTTP response .