-
Use Composer to install Whoops into your project:
composer require filp/whoops
-
Register the pretty handler in your code:
$whoops = new \Whoops\Run; $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); $whoops->register();
$whoops = new \Whoops\Run; $errorTitile="框架出错了!"; $option=new \Whoops\Handler\PrettyPageHandler; $option->setPageTitle($errorTitile); $whoops->pushHandler($option); $whoops->register();
dump($content);