https://github.com/geocoder-php/GeocoderLaravel/blob/master/config/geocoder.php I cant get pass this point. 1. this is my Job


        public $model;

            public function __construct($model)
            {
                $this->model = $model;
            }

            public function handle()
            {
                $result = new Geocoder();
                $result->geocode($this->model->getAddressString());
              // $result = Geocoder::geocode($this->model->getAddressString());

                $this->model->setCoordinates($result->getLatitude(), $result->getLongitude());
            }
        }
         I followed the instructions in the repo readme to install geocoder into my project.
        2. this is my controller

On trying to get Langitude and latitude from address , i get the no provider registered error..

         protected function create(array $data)
            {                    

                $user =  User::create([
                    'fname' => $data['fname'],
                    'lname' => $data['lname'],
                    'email' => $data['email'],
                    'zipcode' => $data['zipcode'],
                    'address_latitude' => $data['address_latitude'],
                    'address_longitude' =>$data['address_longitude'],
                    'password' => Hash::make($data['password']),
                    'gender' => $data['gender'],

                    'dob' => $data['dob'],

                    'health' => $data['health'],
                ]); 

               //$this-> dispatch(new GeocodePartnerAddress($user)); 
                 $this->dispatch(new GeocodeAddress($user));

            }

On trying to get Langitude and latitude from address , i get the no provider registered error..

    I followed the instructions in the repo readme to install geocoder into my project.

I get "No provider registered." this error if you done this problem please give me solution where i am wrong.

0 Answers