jetrodn
11/14/2018 - 1:54 PM

Laravel error handling

Laravel error handling

/**
     * Render an exception into an HTTP response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Exception  $exception
     * @return \Illuminate\Http\Response
     */
    public function render($request, Exception $exception)
    {
        if($exception instanceof \ErrorException)
        {
            return response()->view('errors.404', [], 404);
        }
        return parent::render($request, $exception);
    }