PHPackages                             trinityrank/geo-location - 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. trinityrank/geo-location

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

trinityrank/geo-location
========================

GeoLocation - show or hide operaters in selected countries

v1.1(2y ago)0120MITPHPPHP ^7.4|^8.0

Since Oct 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/trinity-rank/geo-location)[ Packagist](https://packagist.org/packages/trinityrank/geo-location)[ Docs](https://github.com/trinity-rank/geo-location)[ RSS](/packages/trinityrank-geo-location/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (8)DependenciesVersions (10)Used By (0)

Very short description of the package
=====================================

[](#very-short-description-of-the-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e80822b63ba518d55706099e38a90e1cd33b16db7107dfc35bc39d05da773d14/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7472696e69747972616e6b2f67656f2d6c6f636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/trinityrank/geo-location)[![Total Downloads](https://camo.githubusercontent.com/7ce828d2c9bebfea8d15c87bd0490fbab4f9631fa205b65501ed034f98979ff7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7472696e69747972616e6b2f67656f2d6c6f636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/trinityrank/geo-location)

Choose to show or hide Operaters by choosing the countries from list.

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

[](#installation)

### Step 1: Install package

[](#step-1-install-package)

To get started with Laravel Geo Location, use Composer command to add the package to your composer.json project's dependencies:

```
    composer require trinityrank/geo-location
```

### Step 2: Migration

[](#step-2-migration)

- You need to publish migration from package

```
    php artisan vendor:publish --provider="Trinityrank\GeoLocation\GeoLocationServiceProvider" --tag="geolocation-migration"
```

- And then you need to run migration for alltenant(s)

```
    php artisan tenant:artisan "migrate"
```

- Or only for one speciffic tenant

```
    php artisan tenant:artisan "migrate" --tenant=[--TENANT-ID--]
```

### Step 3: Operaters Model database

[](#step-3-operaters-model-database)

Add this fields to '$fillable' inside Operaters model

```
    public $fillable = [
        ...
        'geolocation_option',
        'geolocation_countries',
    ];
```

### Step 4: Add field

[](#step-4-add-field)

- Add field to your (Operater) resource into "fields" method

```
    use Trinityrank\GeoLocation\GeoLocationPanel;

    ...

    GeoLocationPanel::make()
```

- Or if you use conditional fields than just add this into "fields" method

```
    $this->getGeoLocationPanel('GeoLocation Page Settings', 'geolocation')
```

### Step 5: If you are using conditional fields

[](#step-5-if-you-are-using-conditional-fields)

Add this in tenant config

```
    'conditional_fields' => [
        ...

        'operater' => [
            'geolocation' => [
                'visible' => true
            ]
        ]

        ...
    ]
```

### Step 6: Frontend part

[](#step-6-frontend-part)

- Without token

```
    use Trinityrank\GeoLocation\GeoLocationOperater;

    ...

    $operaters = GeoLocationOperater::list($operaters_array);
```

- With token

Add new variable in .ENV file

```
    GEOLOCATION_API_TOKEN=[--Replace-this-with-website-token--]
```

You can connect with 'config/main.php' file

```
    'geolocation_api_token' => env('GEOLOCATION_API_TOKEN', null),
```

Then we can use our Geo Location

```
    use Trinityrank\GeoLocation\GeoLocationOperater;

    ...

    $operaters = GeoLocationOperater::list($operaters_array, $api_token = [optional]);
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 94.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 ~114 days

Recently: every ~227 days

Total

9

Last Release

801d ago

Major Versions

v0.2.5 → v1.0.02022-07-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/87767187?v=4)[TrinityRank DevTeam](/maintainers/trinity-rank)[@trinity-rank](https://github.com/trinity-rank)

---

Top Contributors

[![nebojsa-trinityrank](https://avatars.githubusercontent.com/u/87073514?v=4)](https://github.com/nebojsa-trinityrank "nebojsa-trinityrank (18 commits)")[![trinity-rank](https://avatars.githubusercontent.com/u/87767187?v=4)](https://github.com/trinity-rank "trinity-rank (1 commits)")

---

Tags

laravelnovageo-locationtrinityrank

### Embed Badge

![Health badge](/badges/trinityrank-geo-location/health.svg)

```
[![Health](https://phpackages.com/badges/trinityrank-geo-location/health.svg)](https://phpackages.com/packages/trinityrank-geo-location)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3453.7M8](/packages/optimistdigital-nova-multiselect-field)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

52178.7k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17186.3k1](/packages/murdercode-nova4-tinymce-editor)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11273.0k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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