diff --git a/src/Thujohn/Analytics/AnalyticsServiceProvider.php b/src/Thujohn/Analytics/AnalyticsServiceProvider.php index d9a445a..bcd3f71 100644 --- a/src/Thujohn/Analytics/AnalyticsServiceProvider.php +++ b/src/Thujohn/Analytics/AnalyticsServiceProvider.php @@ -51,6 +51,9 @@ public function register() ) ); + foreach ($app['config']->get('analytics::apiclient_config') as $key => $value) + $client->setClassConfig($key, $value); + return new Analytics($client); }); diff --git a/src/config/config.php b/src/config/config.php index daecb43..1ed631a 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -69,4 +69,25 @@ */ 'use_objects' => true, + + + /* + |-------------------------------------------------------------------------- + | Google API client config + |-------------------------------------------------------------------------- + | + | Povides Google API client configuration. + | (https://github.com/google/google-api-php-client) + | + | Example: + | 'apiclient_config' => array( + | 'application_name' = "My App", + | 'Google_Cache_File' => array( + | 'directory' => storage_path() . '/Google_Client' + | ) + | ), + */ + + 'apiclient_config' => array( + ), );