*/ class IntegrationServiceProvider extends ServiceProvider { /** * Register the service provider. * * @return void */ public function register() { $this->registerBeacon(); $this->registerCredits(); $this->registerFeed(); $this->registerSystem(); $this->registerReleases(); } /** * Register the beacon class. * * @return void */ protected function registerBeacon() { $this->app->singleton(BeaconContract::class, function ($app) { $config = $app['config']; return new Beacon($config); }); } /** * Register the credits class. * * @return void */ protected function registerCredits() { $this->app->singleton(CreditsContract::class, function ($app) { $cache = $app['cache.store']; return new Credits($cache); }); } /** * Register the feed class. * * @return void */ protected function registerFeed() { $this->app->singleton(FeedContract::class, function ($app) { $cache = $app['cache.store']; return new Feed($cache); }); } /** * Register the system class. * * @return void */ protected function registerSystem() { $this->app->singleton(SystemContract::class, function (Container $app) { $config = $app['config']; return new System($config); }); } /** * Register the releases class. * * @return void */ protected function registerReleases() { $this->app->singleton(ReleasesContract::class, function ($app) { $cache = $app['cache.store']; $token = $app['config']->get('services.github.token'); return new Releases($cache, $token); }); } }