private function getErrorPage(ErrorBag $errorBag)
    {
        $code = $errorBag->getCode();
        $data = ['bag' => $errorBag, 'errorBag' => $errorBag];
        //Fetch user error page for the error code
        try {
            return View::fetch("errors/$code", $data);
        } catch (Exception $e) {
            return View::fetch("errors/default", $data);
        }
    }
private function getErrorPage(ErrorBag $errorBag)
    {
        $code = $errorBag->getCode();
        $data = ['bag' => $errorBag, 'errorBag' => $errorBag];
        //Fetch user error page for the error code
        try {
            return View::fetch("errors/$code", $data);
        } catch (Exception $e) {
            return View::fetch("errors/default", $data);
        }
    }
private function getErrorPage ( ErrorBag $ errorBag ) { $ code = $ errorBag -> getCode ( ) ; $ data = [ 'bag' => $ errorBag , 'errorBag' => $ errorBag ] ; //Fetch user error page for the error code try { return View :: fetch ( "errors/$code" , $ data ) ; } catch ( Exception $ e ) { return View :: fetch ( "errors/default" , $ data ) ; } }
Return error page content for the given ErrorBag
@param ErrorBag $errorBag
@return string
@throws Exception
Return error page content for the given ErrorBag