/** * Render an exception using Whoops. * * @param \Exception $e * @return \Illuminate\Http\Response */ protected function renderExceptionWithWhoops(Exception $e) { $whoops = new \Whoops\Run(); $handler = new \Whoops\Handler\PrettyPageHandler(); $handler->addResourcePath(public_path()); $handler->addCustomCss('css/whoops.min.css'); $whoops->pushHandler($handler); return new \Illuminate\Http\Response($whoops->handleException($e)); }