PHPackages                             marshmallow/dataset-google-geotargets - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. marshmallow/dataset-google-geotargets

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

marshmallow/dataset-google-geotargets
=====================================

Import all GeoTargets from Google into your Laravel project.

v1.2.0(3y ago)03.4k↓83.3%[1 PRs](https://github.com/marshmallow-packages/dataset-google-geotargets/pulls)MITPHPPHP ^7.4|^8.0CI passing

Since Jul 23Pushed 2w ago1 watchersCompare

[ Source](https://github.com/marshmallow-packages/dataset-google-geotargets)[ Packagist](https://packagist.org/packages/marshmallow/dataset-google-geotargets)[ Docs](https://github.com/Marshmallow-Development/)[ RSS](/packages/marshmallow-dataset-google-geotargets/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (1)Dependencies (2)Versions (9)Used By (0)

[![alt text](https://camo.githubusercontent.com/329958cb02b7bee461fd9dcae7a0a3a34e6595669116ff441ad5ef9e77bc511c/68747470733a2f2f63646e2e6d617273686d616c6c6f772d6f66666963652e636f6d2f6d656469612f696d616765732f6c6f676f2f6d617273686d616c6c6f772e7472616e73706172656e742e7265642e706e67 "marshmallow.")](https://camo.githubusercontent.com/329958cb02b7bee461fd9dcae7a0a3a34e6595669116ff441ad5ef9e77bc511c/68747470733a2f2f63646e2e6d617273686d616c6c6f772d6f66666963652e636f6d2f6d656469612f696d616765732f6c6f676f2f6d617273686d616c6c6f772e7472616e73706172656e742e7265642e706e67)

Laravel Google Geo Targets
==========================

[](#laravel-google-geo-targets)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2f0438c7c7de71dc4620aab57e832af10a5b3ef5d8677ac5f2a0720a02db3751/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617273686d616c6c6f772f646174617365742d676f6f676c652d67656f746172676574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/dataset-google-geotargets)[![Tests](https://camo.githubusercontent.com/5813810c829e9b2f5cd2091d3a5e1e07c5476729ce14ae03f72cc8ccfd48bd8f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d617273686d616c6c6f772d7061636b616765732f646174617365742d676f6f676c652d67656f746172676574732f7068702d73796e7461782d636865636b65722e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/marshmallow-packages/dataset-google-geotargets/actions/workflows/php-syntax-checker.yml)[![Total Downloads](https://camo.githubusercontent.com/089df1f8db8e2c6d11607567145492bb4441cb754c44545c8b4af16b71925381/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617273686d616c6c6f772f646174617365742d676f6f676c652d67656f746172676574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/dataset-google-geotargets)

Import all GeoTargets from Google into your Laravel project.

This dataset contains all the geo locations from Google. We update the source when Google publishes a new one and you can reseed your data. By default only the Netherlands is imported, but you can change this in the config if you want to.

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

[](#installation)

Install the package via Composer:

```
composer require marshmallow/dataset-google-geotargets
```

The service provider is registered automatically through Laravel package discovery.

### Publish and run the migrations

[](#publish-and-run-the-migrations)

Before you run the migration, publish the migrations first:

```
php artisan vendor:publish --provider="Marshmallow\Datasets\GoogleGeoTargets\ServiceProvider" --tag="migrations"
```

Run the migrations to create the database schema:

```
php artisan migrate
```

### Publish the config

[](#publish-the-config)

Publish the config so you are able to choose which countries will be seeded to the table and which data types will be seeded. By default this is set to the Netherlands and all data types. If the defaults work for you, you don't need to publish the config.

```
php artisan vendor:publish --provider="Marshmallow\Datasets\GoogleGeoTargets\ServiceProvider"
```

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

[](#configuration)

The published `config/google-geotargets.php` file exposes the following options:

KeyDefaultDescription`countries``['NL']`Alpha-2 country codes you wish to sync. An empty array seeds all countries.`types`All `GoogleGeoTarget` type constantsThe geo target types you wish to sync.The available type constants live on `Marshmallow\Datasets\GoogleGeoTargets\Models\GoogleGeoTarget`, for example `GoogleGeoTarget::CITY`, `GoogleGeoTarget::PROVINCE`, `GoogleGeoTarget::COUNTRY`, `GoogleGeoTarget::AIRPORT` and more.

Seed the tables
---------------

[](#seed-the-tables)

You need to seed two tables: the country table and the Google Geo Target table.

```
# Seed the country table.
php artisan db:seed --class="Marshmallow\Datasets\Country\Seeders\CountrySeeder"

# Seed the Google Geo Target table.
php artisan db:seed --class="Marshmallow\Datasets\GoogleGeoTargets\Seeds\GoogleGeoTargetsSeeder"
```

Usage
-----

[](#usage)

Each `GoogleGeoTarget` is related to its `type`, its `parent`, and its child `cities`:

```
use Marshmallow\Datasets\Country\Models\Country;
use Marshmallow\Datasets\GoogleGeoTargets\Models\GoogleGeoTarget;

$country = Country::alpha2('NL');
$country->provinces->first()->cities->first()->name;

// Resolve the type of a geo target.
$target = GoogleGeoTarget::first();
$target->type->name;
```

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please report security vulnerabilities by email to  rather than via the public issue tracker.

Credits
-------

[](#credits)

- [Stef](https://marshmallow.dev)
- [All Contributors](https://github.com/marshmallow-packages/dataset-google-geotargets/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see the [License File](LICENSE) for more information.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance63

Regular maintenance activity

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~242 days

Total

4

Last Release

1446d ago

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

v1.1.1PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/be33d2624e24c516e73892b0929447cc762f3622c024ab8d0d2a59042e5d2c7f?d=identicon)[marshmallow](/maintainers/marshmallow)

---

Top Contributors

[![stefvanesch](https://avatars.githubusercontent.com/u/46725619?v=4)](https://github.com/stefvanesch "stefvanesch (24 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

marshmallowGeoTargetsGeo TargetsGoogel Geo TargetsGoogle GeoTargets

### Embed Badge

![Health badge](/badges/marshmallow-dataset-google-geotargets/health.svg)

```
[![Health](https://phpackages.com/badges/marshmallow-dataset-google-geotargets/health.svg)](https://phpackages.com/packages/marshmallow-dataset-google-geotargets)
```

PHPackages © 2026

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