alexpechkarev / google-geocoder

Google Geocoder API v3 for Laravel
MIT License
74 stars 13 forks source link

Error Accessing the facade #10

Closed webface closed 8 years ago

webface commented 8 years ago

use Alexpechkarev\GoogleGeocoder\GoogleGeocoderServiceProvider;

$param = array("address"=>$request->input('address').' '.$request->input('city').' '.$request->input('state')); $response = \Geocoder::geocode('json', $param); return $response;

I get the error..

FatalErrorException in ProfileController.php line 49: Class 'Geocoder' not found

How do I reference this class? Thanks

alexpechkarev commented 8 years ago

Hi webface,

Change: use Alexpechkarev\GoogleGeocoder\GoogleGeocoderServiceProvider; to use Alexpechkarev\GoogleGeocoder\GoogleGeocoder.php

Regards, Alexander

telcy commented 8 years ago

I have the same problem and your suggestion does not fix it.

Laravel 5.1

Any other things we can do? thanks

alexpechkarev commented 8 years ago

Hi telcy,

Please can you provide example of your code ? Regards

telcy commented 8 years ago

Just tried it again today. And it is working. Never mind..

Thanks :)

alexpechkarev commented 8 years ago

Great to hear that telcy!