How to override Locale and API key on controller?
elfeffe opened this issue · 4 comments
elfeffe commented
This is more a question, is there any way to override the locale and the API?
mikebronner commented
Yes, you can do it either in config, or during runtime, as explained here: geocoder-php/Geocoder#408 (comment)
Hope this helps :)
elfeffe commented
Thank you @mikebronner
But that’s for a chain, it is not the same, right?
How do you set locale here?
app('geocoder')->geocode('Los Angeles, CA')->get();
mikebronner commented
@elfeffe You cannot set the locale on the query, you have to set it on the provider. The chain is like any other provider. Instead of chain in that example, you would need to spin up a GoogleMaps or Bing or whichever provider you want to use with your desired locale. Hope that helps?
elfeffe commented
Ok, thanks for your help