public function render($request, Exception $e) { if ($e instanceof NotFoundHttpException) { return response()->view('errors.missing', [], 404); } // for production if (app()->environment() === 'production') { return response()->view('errors.500', [], 500); } return parent::render($request, $e); }