PHPackages                             jiejunf/laravel-locations - 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. jiejunf/laravel-locations

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

jiejunf/laravel-locations
=========================

location data, flag and api for laravel.

v2.0.1(4y ago)053MITPHP

Since Dec 23Pushed 4y ago1 watchersCompare

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

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

[中文](readme-CN.md)

This package provide location data, flag and api for laravel.

install
-------

[](#install)

```
composer require jiejunf/laravel-locations
```

resource
--------

[](#resource)

### publish config

[](#publish-config)

```
php artisan vendor:publish --provider="Jiejunf\\LaravelLocations\\LocationProvider"
```

### make flags dir

[](#make-flags-dir)

Package service provider always sets flags-path into `config.filesystems.links` on boot.

```
php artisan storage:link
```

This script will make a symbol link in /public. You should add it into /.gitignore .

API
---

[](#api)

> api routes have a prefix, setting in `locations.route`. default is `api/locations/`.
>
> Data can be corrected in the configuration `locations.fix_countries`.

- `GET` countries
    - query:
        - page `int` `optional` page number. Default no paging.
        - per\_page `int` `optional` per page count. Default 30
        - sort\_by `string|array` `optional` Default iso2
        - descending `bool` `optional` active if sort\_by is string. Default false
        - sort\_option `string` `optional` for phone. Default REGULAR.
            - REGULAR
            - STRING

The API resource class can be used to modify the response content. default:

```
php artisan make:resource Locations/Country
```

Or specify in `locations.api_resources`

upgrade
-------

[](#upgrade)

### from v1

[](#from-v1)

All object types returned from the Location class are changed to array

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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 ~27 days

Total

3

Last Release

1547d ago

Major Versions

v1.0 → v2.02022-02-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/3afd4daf68d74dd3aebb285383502930c6755899eed9478e2bff9cd141b7d15c?d=identicon)[jiejunf](/maintainers/jiejunf)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/jiejunf-laravel-locations/health.svg)

```
[![Health](https://phpackages.com/badges/jiejunf-laravel-locations/health.svg)](https://phpackages.com/packages/jiejunf-laravel-locations)
```

###  Alternatives

[kartik-v/yii2-icons

Set of icon frameworks for use in Yii Framework 2.0

73970.3k34](/packages/kartik-v-yii2-icons)

PHPackages © 2026

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