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

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

makkinga/laravel-flags
======================

A helper for placing SVG flags in your Laravel project

0.0.6(5y ago)030MITPHPPHP &gt;=7.2

Since Dec 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/makkinga/laravel-flags)[ Packagist](https://packagist.org/packages/makkinga/laravel-flags)[ RSS](/packages/makkinga-laravel-flags/feed)WikiDiscussions main Synced today

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

Laravel Flags
=============

[](#laravel-flags)

A helper for placing SVG flags in your Laravel project

[![GitHub tag (latest SemVer)](https://camo.githubusercontent.com/f6872b1fe8b38c83277bc0ada1ba7883124fefa379beb1e6725dc26bf285ce4b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6d616b6b696e67612f6c61726176656c2d666c6167732e7376673f6c6162656c3d76657273696f6e)](https://camo.githubusercontent.com/f6872b1fe8b38c83277bc0ada1ba7883124fefa379beb1e6725dc26bf285ce4b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6d616b6b696e67612f6c61726176656c2d666c6167732e7376673f6c6162656c3d76657273696f6e)[![GitHub tag (latest SemVer)](https://camo.githubusercontent.com/9798a628319d77e4136722429499dadcc37264f7d8c81b55bf7a469275bdd241/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6d616b6b696e67612f6c61726176656c2d666c6167732e7376673f6c6162656c3d55706461746564)](https://camo.githubusercontent.com/9798a628319d77e4136722429499dadcc37264f7d8c81b55bf7a469275bdd241/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6d616b6b696e67612f6c61726176656c2d666c6167732e7376673f6c6162656c3d55706461746564)[![Total Downloads](https://camo.githubusercontent.com/33483395aca74b7190b42ec1680439be4e3dcb7c0f0a805247f93d90b425a1e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d616b6b696e67612f6c61726176656c2d666c6167732e737667)](https://packagist.org/packages/makkinga/laravel-filetype-icons)[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)

[![Buy Me A Coffee](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/k5DfS3Q)

Installation
============

[](#installation)

Install using composer

```
composer require makkinga/laravel-flags
```

Usage
=====

[](#usage)

Blade
-----

[](#blade)

Use this helper to place an SVG in a Blade view.

```
{!! flag()->country('nl') !!}
```

The `country()` method expects an alpa-2 or alpha-3 ISO 3166-1 country code. See [this page](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) for a complete list of all codes.

Config
------

[](#config)

If your locales differ from the ISO codes (e.g.: you use `en` instead of `gb`), you can optionally publish the cofig to alias the country codes.

```
php artisan vendor:publish --provider="Makkinga\Flags\ServiceProvider" --tag="config"
```

**flags.php**

```
