From d84dc9bb14ec7ff3130e9e6979c2a20111e34d7e Mon Sep 17 00:00:00 2001 From: takeokunn Date: Sat, 21 Apr 2018 21:09:48 +0900 Subject: [PATCH] Enable multiple gcs config --- src/GoogleCloudStorageServiceProvider.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GoogleCloudStorageServiceProvider.php b/src/GoogleCloudStorageServiceProvider.php index d4c1d25..96bcc28 100644 --- a/src/GoogleCloudStorageServiceProvider.php +++ b/src/GoogleCloudStorageServiceProvider.php @@ -12,11 +12,13 @@ class GoogleCloudStorageServiceProvider extends ServiceProvider { /** * Perform post-registration booting of services. + * + * @param string $config */ - public function boot() + public function boot(string $config = '') { $factory = $this->app->make('filesystem'); /* @var FilesystemManager $factory */ - $factory->extend('gcs', function ($app, $config) { + $factory->extend('gcs' . $config, function ($app, $config) { $storageClient = new StorageClient([ 'projectId' => $config['project_id'], 'keyFilePath' => array_get($config, 'key_file'),