PHPackages                             xabou/google-geocoding - 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. [API Development](/categories/api)
4. /
5. xabou/google-geocoding

ActiveLibrary[API Development](/categories/api)

xabou/google-geocoding
======================

Google Geocoding API integration for Laravel

v0.0.3(6y ago)22.6k1[2 PRs](https://github.com/xabou/google-geocoding/pulls)MITPHP

Since Jan 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xabou/google-geocoding)[ Packagist](https://packagist.org/packages/xabou/google-geocoding)[ RSS](/packages/xabou-google-geocoding/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (2)Versions (6)Used By (0)

Abandoned
=========

[](#abandoned)

All good things come to an end. Thanks everyone for using this package :)

Laravel Geocoder
================

[](#laravel-geocoder)

This package provides a wrapper around Google Geocoding API for your Laravel application.

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

[](#installation)

#### 1. Require via composer

[](#1-require-via-composer)

Add the `xabou/google-geocoding` Composer dependency to your project.

```
composer require xabou/google-geocoding

```

#### 2. Register Service Provider

[](#2-register-service-provider)

Open `config/app.php` and append `providers` array with:

```
Xabou\Geocoding\GeocodingServiceProvider::class

```

Usage
-----

[](#usage)

#### Singleton

[](#singleton)

Geocoder is register as singleton in Laravel's Service Container making it easy to call it
anywhere within your application. Simply 'make' Geocoder with app helper method.

```
app('Geocoder')
```

#### Fluent API

[](#fluent-api)

Geocoder provides a fluent API for every available parameter in geocoding request.

```
app('Geocoder')->address('stadiou 14')
               ->language('el')
               ->region('gr')
               ->geocode()
```

You can also pass an array of parameters

```
app('Geocoder')->parameters([
                  'address'  => 'stadiou 14'
                  'language' => 'el'
                  'region'   => 'gr'
                ])
               ->geocode()
```

**Note:** *Key* will be set from config file. Any value passed with parameters method will be overwritten.
More about available parameters you can find at [Google Geocoding Documentation](https://developers.google.com/maps/documentation/geocoding/intro#geocoding).

Configuration
-------------

[](#configuration)

#### Api Key

[](#api-key)

In order to start using Google Geocoding API you must obtain first an [API key](https://developers.google.com/maps/documentation/geocoding/start#api_key).
After getting your API key publish Geocoder's configuration file and make necessary changes.

```
php artisan vendor:publish --tag=geocoding-config

```

A config file with name `geocoding.php` will be created.

```
return [

    /*
   |--------------------------------------------------------------------------
   | Application Key
   |--------------------------------------------------------------------------
   |
   | Your application's API key. Make sure to get a Key before starting using
   | Google Geocoding API.
   |
   */

    'api_key' => '',

    /*
    |--------------------------------------------------------------------------
    | Google Maps Geocoding API URL
    |--------------------------------------------------------------------------
    |
    | Here you san set the URL for the Google Maps Geocoding API. By default,
    | HTTPS protocol has been selected.
    |
    */

    'request_url' => 'https://maps.googleapis.com/maps/api/geocode/',

    /*
    |--------------------------------------------------------------------------
    | Response Output Format
    |--------------------------------------------------------------------------
    |
    | Here you can configure the preferred output format of a Geocoding
    | Request.
    |
    | Supported: "json", "xml"
    |
    */

    'output_format' => 'json',
];
```

\##License

This package is released under the MIT License.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~540 days

Total

3

Last Release

2316d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f2a22b6562ff3839f7a32ca3f75dea09ad70731a0d71cdd9e2e48c2616de340?d=identicon)[xabou](/maintainers/xabou)

---

Top Contributors

[![xabou](https://avatars.githubusercontent.com/u/13403132?v=4)](https://github.com/xabou "xabou (3 commits)")

---

Tags

laravelgeocodinggeocodergoogle

### Embed Badge

![Health badge](/badges/xabou-google-geocoding/health.svg)

```
[![Health](https://phpackages.com/badges/xabou-google-geocoding/health.svg)](https://phpackages.com/packages/xabou-google-geocoding)
```

###  Alternatives

[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[jcf/geocode

Google Geocoding API for Laravel

48160.5k](/packages/jcf-geocode)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
