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);
}