File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,11 @@ class GoogleServiceProvider extends ServiceProvider
1818 */
1919 public function boot ()
2020 {
21- $ this ->app ['PulkitJalan\Google\Client ' ] = function ($ app ) {
22- return $ app ['google.api.client ' ];
23- };
24-
25- $ this ->publishes ([
26- __DIR__ .'/config/config.php ' => config_path ('google.php ' ),
27- ], 'config ' );
21+ if (function_exists ('config_path ' )) {
22+ $ this ->publishes ([
23+ __DIR__ .'/config/config.php ' => config_path ('google.php ' ),
24+ ], 'config ' );
25+ }
2826 }
2927
3028 /**
@@ -36,8 +34,8 @@ public function register()
3634 {
3735 $ this ->mergeConfigFrom (__DIR__ .'/config/config.php ' , 'google ' );
3836
39- $ this ->app [ ' google.api.client ' ] = $ this -> app -> share ( function () {
40- return new Client (config ( ' google ') );
37+ $ this ->app -> singleton ( ' PulkitJalan\Google\Client ' , function ($ app ) {
38+ return new Client ($ app [ ' config ' ][ ' google '] );
4139 });
4240 }
4341
@@ -48,6 +46,6 @@ public function register()
4846 */
4947 public function provides ()
5048 {
51- return ['google.api.client ' , ' PulkitJalan\Google\Client ' ];
49+ return ['PulkitJalan\Google\Client ' ];
5250 }
5351}
You can’t perform that action at this time.
0 commit comments