Closed unixtime closed 9 years ago
Hi Hassan,
In Laravel 5 please create config file in app folder app/google-geocoder.php, copy file contents. Register service provider in app/config.php and then simply call Geocoder:
$param = array("address"=>"76 Buckingham Palace Road London SW1W 9TQ"); $response = \Geocoder::geocode('json', $param);
Please note back slash \Geocoder. In your case try:
public function DisplayAddress(\GoogleGeocoder $request) { ... }
and I think you do not need to import Geocoder as it booted in service providers and available globally in your app.
Hope this helps. Regards, Alexander
Thanks Alex. I had the config file in the wrong place.
Trying to test this package, I guess I am missing a step. I created the config file under the config directory based on the provided instructions. Somehow Laravel 5 is complaining about the config file.
Here is the controller function I have.
Any idea? Thanks.