jeudi 21 juillet 2016

Using filp/whoops as a service provider in Laravel 5.1

I'm trying to integrate the filp/whoops package into Laravel 5.1 app.

Installed the package like this:

composer require filp/whoops:~1.0

Created app/Providers/ErrorServiceProvider.php like this:

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Whoops\Handler\PrettyPageHandler;
use Whoops\Run;

class ErrorServiceProvider extends ServiceProvider {

    public function boot()
    {
        $whoops = new Run;
        $whoops->pushHandler(new PrettyPageHandler);
        $whoops->register();
    }

    public function register()
    {
        //
    }

}

And registered the service provider in config/app.php like this:

'providers' => [
    App\Providers\ErrorServiceProvider::class
]

But I'm still seeing the default error pages.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire