Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 1 year ago.
0

From app/Exceptions/Handler.php you can return an http response from render

public function render($request, Exception $e)
{
	// translates 404's 500's into views found in resources/views/errors
	if ($this->isHttpException($e)){
		return $this->renderHttpException($e);
	}

	//if debug mode show some details about the exception that was thrown
	if(config('app.debug')){
		return (new SymfonyDisplayer(true))->createResponse($e);
	}

	//Gen pop gets a static view when their request breaks our site
	return \Response::view('errors.exception');
}

and of course just make that view in resources

Also if you set APP_DEBUG=true in .env then you can see all the error info in the browser

Edit: I went ahead and fixed my own response when i figured this out, code edited to show what I came up with.

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.