protected function registerServices() { $this->app->singleton('themes', function ($app) { return new Themes($app['files'], $app['config'], $app['view']); }); $this->app->booting(function ($app) { $app['themes']->register(); }); }