PHPackages                             stidges/laravel-country-flags - 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. stidges/laravel-country-flags

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

stidges/laravel-country-flags
=============================

A Laravel wrapper for the stidges/country-flags package

v3.0.1(1y ago)28134.6k↓21.7%10[1 PRs](https://github.com/stidges/laravel-country-flags/pulls)MITPHPPHP ^8.2CI passing

Since Jan 29Pushed 1y ago2 watchersCompare

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

READMEChangelog (7)Dependencies (3)Versions (11)Used By (0)

Laravel Country Flags
=====================

[](#laravel-country-flags)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9df356f24d343b2de94220b3b7718dc267670627dfd31da6373001315edac9b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737469646765732f6c61726176656c2d636f756e7472792d666c6167732e737667)](https://packagist.org/packages/stidges/laravel-country-flags)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Build Status](https://github.com/stidges/laravel-country-flags/actions/workflows/tests.yml/badge.svg)](https://github.com/stidges/laravel-country-flags/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/da18da47e6fae40ba46d81c778905497d96021d1f6549d050f594fb80e0264a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f737469646765732f6c61726176656c2d636f756e7472792d666c6167732e737667)](https://packagist.org/packages/stidges/laravel-country-flags)

A Laravel wrapper for the [stidges/country-flags](https://github.com/stidges/country-flags) package.

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

[](#installation)

You can install the package via Composer:

```
$ composer require stidges/laravel-country-flags
```

The Laravel facade and service provider are registered through auto-discovery, so you can start using it out of the box!

Usage
-----

[](#usage)

This package publishes a Laravel facade for easier usage:

```
use CountryFlag;

echo CountryFlag::get('NL'); // "🇳🇱"
```

It also comes with a helper function that you can use!

```
echo country_flag('NL'); // "🇳🇱"
```

Aliasing
--------

[](#aliasing)

If you would like to make country codes available under a custom aliases, you can update the configuration file. First you should publish it:

```
$ php artisan vendor:publish --provider="Stidges\LaravelCountryFlags\CountryFlagsServiceProvider"
```

This will make the configuration file available under `config/country-flags.php`. You can update the `'aliases'` section to add your custom aliases:

```
return [
    'aliases' => [
        'AA' => 'NL',
    ],
];
```

And it will be available for you to access:

```
echo country_flag('AA'); // "🇳🇱"
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Stidges](https://github.com/stidges)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance44

Moderate activity, may be stable

Popularity44

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 78.3% 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 ~287 days

Recently: every ~379 days

Total

10

Last Release

440d ago

Major Versions

v1.0.4 → v2.0.02021-01-08

v2.0.2 → v3.0.02024-03-29

PHP version history (4 changes)v1.0.0PHP ~7.0

v1.0.1PHP ^7.0

v2.0.0PHP ^7.3|^8.0

v3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d3026e6eab9c0c75c7315cd4b8ea41d1ab9e0b7665a1f9f9396e2f1f716deba?d=identicon)[stidges](/maintainers/stidges)

---

Top Contributors

[![stidges](https://avatars.githubusercontent.com/u/4399967?v=4)](https://github.com/stidges "stidges (36 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (6 commits)")[![stijnvanouplines](https://avatars.githubusercontent.com/u/16742744?v=4)](https://github.com/stijnvanouplines "stijnvanouplines (2 commits)")[![booni3](https://avatars.githubusercontent.com/u/20134485?v=4)](https://github.com/booni3 "booni3 (1 commits)")[![toomasr](https://avatars.githubusercontent.com/u/196499?v=4)](https://github.com/toomasr "toomasr (1 commits)")

---

Tags

countryemojiflagslaravellaravelunicodecountriesflagcountryemojicountry flags

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stidges-laravel-country-flags/health.svg)

```
[![Health](https://phpackages.com/badges/stidges-laravel-country-flags/health.svg)](https://phpackages.com/packages/stidges-laravel-country-flags)
```

###  Alternatives

[stidges/country-flags

A small package to convert a country code to the corresponding country flag emoji

29256.6k4](/packages/stidges-country-flags)[rinvex/countries

Rinvex Countries is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.

1.7k7.4M48](/packages/rinvex-countries)[pragmarx/countries

PHP Countries and Currencies

1.9k3.3M18](/packages/pragmarx-countries)[dougsisk/laravel-country-state

Country &amp; state helper for Laravel.

1681.7M](/packages/dougsisk-laravel-country-state)[pragmarx/countries-laravel

Countries for Laravel

1471.1M2](/packages/pragmarx-countries-laravel)[dipeshsukhia/laravel-country-state-city-data

Country State City Data Provider

8230.8k](/packages/dipeshsukhia-laravel-country-state-city-data)

PHPackages © 2026

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