Last active
January 16, 2018 10:54
-
-
Save nesk/056413c784d59774b68fa8b75d741b16 to your computer and use it in GitHub Desktop.
Laravel default error page (2/2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Render the given HttpException. | |
* | |
* @param \Symfony\Component\HttpKernel\Exception\HttpException $e | |
* @return \Symfony\Component\HttpFoundation\Response | |
*/ | |
protected function renderHttpException(HttpException $e) | |
{ | |
if (! view()->exists("errors.{$e->getStatusCode()}")) { | |
return response()->view('errors.default', ['exception' => $e], 500, $e->getHeaders()); | |
} | |
return parent::renderHttpException($e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment