PHPackages                             pnlinh/laravel-google-distance - 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. pnlinh/laravel-google-distance

ActiveLibrary

pnlinh/laravel-google-distance
==============================

Caculate Google Distance Matrix API in Laravel

v1.0.9(3y ago)1653.1k—2.6%8[1 issues](https://github.com/pnlinh/laravel-google-distance/issues)MITPHPPHP ^7.1.3|^7.3|^8.0

Since Nov 1Pushed 3y ago2 watchersCompare

[ Source](https://github.com/pnlinh/laravel-google-distance)[ Packagist](https://packagist.org/packages/pnlinh/laravel-google-distance)[ RSS](/packages/pnlinh-laravel-google-distance/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (12)Used By (0)

Google Distance in Laravel
==========================

[](#google-distance-in-laravel)

[![StyleCI](https://camo.githubusercontent.com/579ad33f88a94f95b44caae00f6dab6fe6b730f845308b82e3cd8bf1a9dc36e6/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3135353334393237312f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/155349271)[![Quality Score](https://camo.githubusercontent.com/73e02bd28ff0e33050067b17827d9ea33d02154a355d9c17fd75658901b63a59/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f706e6c696e682f6c61726176656c2d676f6f676c652d64697374616e63652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/pnlinh/laravel-google-distance/)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1.3
- Laravel &gt;= 5.5.\*

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

[](#installation)

Require this package with composer.

```
composer require pnlinh/laravel-google-distance
```

To publishes config `config/google-distance.php`, use command:

```
php artisan vendor:publish --tag="google-distance"
```

You must set your [Google Maps API Key](https://developers.google.com/maps/documentation/distance-matrix/get-api-key) GOOGLE\_MAPS\_DISTANCE\_API\_KEY in your .env file like so:

```
GOOGLE_MAPS_DISTANCE_API_KEY=ThisIsMyGoogleApiKey
GOOGLE_MAPS_DISTANCE_UNITS=ThisIsUnits
```

Usage
-----

[](#usage)

```
// Use Facades
use Pnlinh\GoogleDistance\Facades\GoogleDistance;

$distance = GoogleDistance::calculate('FromAddress', 'To Address');

// Use Helper Function
$distance = google_distance('From Address', 'To Address');
```

Test
----

[](#test)

```
composer test
```

Credits
-------

[](#credits)

- [Ngoc Linh Pham](https://github.com/pnlinh)
- [Przemysław](https://github.com/da-sie)

For more info, please visit

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 89.1% 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 ~169 days

Recently: every ~304 days

Total

10

Last Release

1224d ago

PHP version history (2 changes)v1.0.0PHP ^7.1.3

v1.0.9PHP ^7.1.3|^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5162a0294c9d7ddf47b6a0059206778b1f06269e73c560d07aea5683d1e65b0c?d=identicon)[pnlinh](/maintainers/pnlinh)

---

Top Contributors

[![pnlinh](https://avatars.githubusercontent.com/u/26193890?v=4)](https://github.com/pnlinh "pnlinh (41 commits)")[![chrismeistre](https://avatars.githubusercontent.com/u/5166727?v=4)](https://github.com/chrismeistre "chrismeistre (3 commits)")[![da-sie](https://avatars.githubusercontent.com/u/459266?v=4)](https://github.com/da-sie "da-sie (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pnlinh-laravel-google-distance/health.svg)

```
[![Health](https://phpackages.com/badges/pnlinh-laravel-google-distance/health.svg)](https://phpackages.com/packages/pnlinh-laravel-google-distance)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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