PHPackages                             bodunde/geocoder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. bodunde/geocoder

ActiveLibrary

bodunde/geocoder
================

A laravel package that helps you with geocoding addresses and reverse geocoding coordinates using the google maps api. It also helps in calculating the distance between two locations using the Hervasine formula and the coordinates of the locations

v1.2.1(9y ago)247.7k↑650%9[2 issues](https://github.com/andela-badebiyi/Laravel-Google-Geocoder/issues)MITPHPPHP &gt;=5.5.9

Since Oct 9Pushed 6y ago3 watchersCompare

[ Source](https://github.com/andela-badebiyi/Laravel-Google-Geocoder)[ Packagist](https://packagist.org/packages/bodunde/geocoder)[ RSS](/packages/bodunde-geocoder/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

Laravel-Geocoder
================

[](#laravel-geocoder)

A Laravel Package that interfaces with the google maps API to help convert a plain address to longitude and latitude coordinates and vice-versa. It can also calculate the distance (in kilometers or miles) between two locations using their coordinates.

Installation
------------

[](#installation)

- include the package in your `composer.json` file and run `composer update` or run `composer require bodunde/geocoder` or you can do it oldschool and just clone the repo and include it in your application.
- navigate to your `config` directory in your laravel application and locate the `app.php` file
- add this line to your service provide `Bodunde\GoogleGeocoder\GeocoderServiceProvider::class`
- publish its config file by running `php artisan vendor:publish`
- include your `google_api_key` in `geocoder.php` file located in the config directory Voila!!! You are done

Usage
-----

[](#usage)

```
