PHPackages                             omisai/laravel-countries - 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. omisai/laravel-countries

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

omisai/laravel-countries
========================

A Laravel adapter for the countries package.

v1.0.0(3mo ago)148[1 PRs](https://github.com/omisai-tech/laravel-countries/pulls)MITPHPPHP ^8.2CI passing

Since Mar 22Pushed 5d agoCompare

[ Source](https://github.com/omisai-tech/laravel-countries)[ Packagist](https://packagist.org/packages/omisai/laravel-countries)[ Docs](https://github.com/omisai-tech/laravel-countries)[ RSS](/packages/omisai-laravel-countries/feed)WikiDiscussions master Synced 3w ago

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

Laravel Countries
=================

[](#laravel-countries)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d9c35f4d439493cb6de2cd2fd6abed372a498edfb8bfb55b73d27965d62d3c66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6d697361692f6c61726176656c2d636f756e74726965732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/omisai/laravel-countries)[![License](https://camo.githubusercontent.com/458425f8985b0b0c8a736cffe75e05a098e3d77906acddbcad2bfc54492a4e02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Laravel adapter for [omisai/php-countries](https://github.com/omisai-tech/php-countries). It registers the `Omisai\Countries\Collection` in the Laravel service container and exposes it through a facade.

Features
--------

[](#features)

- Registers `Omisai\Countries\Collection` as a singleton in the container
- Resolves the collection by class name or the `countries` binding
- Provides a `Countries` facade
- Supports Laravel 11, 12, and 13

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

[](#requirements)

- PHP 8.2+
- Laravel 11, 12, or 13

Laravel 13 requires PHP 8.3+, which is enforced by Composer through Laravel's own package constraints.

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

[](#installation)

Install the package via Composer:

```
composer require omisai/laravel-countries
```

Laravel package discovery will register the service provider and facade automatically.

Usage
-----

[](#usage)

Resolve the collection from the container:

```
use Omisai\Countries\Collection;

$countries = app(Collection::class);
$names = $countries->getCountriesName();
```

Resolve it by binding name:

```
$countries = app('countries');
```

Use the facade:

```
use Omisai\Laravel\Countries\Facades\Countries;

$names = Countries::getCountriesName();
$hungary = Countries::getCountryByAlpha2('HU');
```

Testing
-------

[](#testing)

Run the test suite using Pest:

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to this project.

Security
--------

[](#security)

Please see [SECURITY.md](.github/SECURITY.md) for details on reporting security vulnerabilities.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance92

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

96d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/818e031ac6546efe377b692f91166dc1a6c89b8838ce720b8786e4b15a30db62?d=identicon)[bornemisza](/maintainers/bornemisza)

---

Top Contributors

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

---

Tags

countriescountrylaravelphplaravelcountriescountry

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/omisai-laravel-countries/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[dougsisk/laravel-country-state

Country &amp; state helper for Laravel.

1681.8M](/packages/dougsisk-laravel-country-state)[dipeshsukhia/laravel-country-state-city-data

Country State City Data Provider

8231.3k1](/packages/dipeshsukhia-laravel-country-state-city-data)[stidges/laravel-country-flags

A Laravel wrapper for the stidges/country-flags package

28140.0k](/packages/stidges-laravel-country-flags)[hibit-dev/geodetect

Automatically detect user's geo data based on their IP address

2321.5k](/packages/hibit-dev-geodetect)

PHPackages © 2026

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