protected function registerExceptionHandler() { $this->app->singleton('api.exception', function ($app) { return new ExceptionHandler($app['Illuminate\\Contracts\\Debug\\ExceptionHandler'], $this->config('errorFormat'), $this->config('debug')); }); }