app->environment() !== 'production') { $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); } if (app()->isLocal()) { $this->app->register(\VIACreative\SudoSu\ServiceProvider::class); } API::error(function (ModelNotFoundException $exception) { abort(404); }); API::error(function (AuthorizationException $exception) { abort(403, $exception->getMessage()); }); } }