app->singleton(ApiClient::class, function ($app) { return new ApiClient( $app['config']['services']['api']['api_url'], $app['config']['services']['api']['per_page'], $app['config']['services']['api']['domain_src'], $app['config']['services']['api']['use_cache'], $app['config']['services']['api']['cache_ttl'], ); }); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return [ApiClient::class]; } /** * Bootstrap services. * * @return void */ public function boot() { // } }