@@ -25,30 +25,27 @@ public function boot()
2525 "config "
2626 );
2727 $ this ->mergeConfigFrom ($ configPath , "geocoder " );
28-
29- $ providerAndDumperAggregator = (new ProviderAndDumperAggregator )
28+ $ geocoder = (new ProviderAndDumperAggregator )
3029 ->registerProvidersFromConfig (collect (config ("geocoder.providers " )));
31-
32- $ this ->app ->singleton ("geocoder " , function ($ app ) use ($ providerAndDumperAggregator ) {
33- return $ providerAndDumperAggregator ;
34- });
35-
36- // Resolve dependency via class name
37- // i.e app(ProviderAndDumperAggregator::class) or _construct(ProviderAndDumperAggregator $geocoder)
38- $ this ->app ->instance (ProviderAndDumperAggregator::class, $ providerAndDumperAggregator );
30+ $ this ->app
31+ ->singleton ("geocoder " , function () use ($ geocoder ) {
32+ return $ geocoder ;
33+ });
34+ $ this ->app
35+ ->instance (ProviderAndDumperAggregator::class, $ geocoder );
3936 }
4037
4138 public function register ()
4239 {
4340 $ this ->app ->alias ("Geocoder " , Geocoder::class);
4441 }
4542
46- public function provides (): array
43+ public function provides () : array
4744 {
48- return ["geocoder " ];
45+ return ["geocoder " , ProviderAndDumperAggregator::class ];
4946 }
5047
51- protected function configPath (string $ path = "" ): string
48+ protected function configPath (string $ path = "" ) : string
5249 {
5350 if (function_exists ("config_path " )) {
5451 return config_path ($ path );
0 commit comments