laravel - Laravel4 old debug page -
how can laravel 4 debugger page in laravel 5 debugger page
here
to
install whoops package:
composer require filp/whoops
then use render exceptions editing app/exceptions/handler.php
:
<?php namespace app\exceptions; use exception; use whoops\run whoops; use illuminate\http\response; use illuminate\foundation\exceptions\handler exceptionhandler; use pragmarx\sdk\services\exceptionhandler\service\facade sdkexceptionhandler; class handler extends exceptionhandler { protected $dontreport = [ 'symfony\component\httpkernel\exception\httpexception' ]; public function report(exception $e) { return parent::report($e); } public function render($request, exception $e) { if ($this->ishttpexception($e)) { return $this->renderhttpexception($e); } if (env('app_debug')) { return $this->whoops($e); } return parent::render($request, $e); } protected function whoops(exception $e) { $handled = with(new whoops) ->pushhandler(new \whoops\handler\prettypagehandler()) ->handleexception($e); return new response( $handled, $e->getstatuscode(), $e->getheaders() ); } }
Comments
Post a Comment