/** * 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)); }
/** * Render an exception using Whoops. * * @param \Exception $e * @return \Illuminate\Http\Response */ protected function renderExceptionWithWhoops(Exception $e) { $whoops = new \Whoops\Run(); $ppHandler = new \Whoops\Handler\PrettyPageHandler(); $ppHandler->setPageTitle('Crap!'); $ppHandler->setResourcesPath(public_path()); $ppHandler->addCustomCss('/css/whoops.css'); // $ppHandler->addDataTable('Dashboard Details', [ // 'User ID' => Auth::user()->id // ]); $ppHandler->setEditor('sublime'); $whoops->pushHandler($ppHandler); return new \Illuminate\Http\Response($whoops->handleException($e), $e->getStatusCode(), $e->getHeaders()); }