I am trying to display a custom error page instead of the default Laravel 5 message :
\"Whoops...looks like something went wrong\"
Instead of the response create a route for your error page in your Routes.php, with the name 'errors.defaultError'. for example
route::get('error', [
'as' => 'errors.defaultError',
'uses' => 'ErrorController@defaultError' ]);
Either make a controller or include the function in the route with
return view('errors.defaultError');
and use a redirect instead. For example
public function render($request, Exception $e)
{
return redirect()->route('errors.defaultError');
}