agatanga/flags
Country flags in SVG format for Laravel application.
51,356
7
| Install | |
|---|---|
composer require agatanga/flags |
|
| Latest Version: | 1.3.0 |
| PHP: | ^7.3|^8.0 |
| License: | MIT |
| Last Updated: | May 26, 2026 |
| Links: | GitHub · Packagist |
Maintainer: vovayatsyuk
Flags
Country flags in SVG format for your Laravel application. Uses lipis/flag-icons icons under the hood.
Installation
composer require agatanga/flags
Usage
Directive
// Render flag using default ratio:
@flag('us')
// Tell what ratio to use, which classes, and attributes to add to the svg element:
@flag('us:1x1', 'w-64', ['id' => 'flag-us'])
Helper
// Render flag using default ratio:
{{ flag('us') }}
// Tell what ratio to use, which classes, and attributes to add to the svg element:
{{ flag('us:1x1', 'w-64', ['id' => 'flag-us']) }}
Configuration
You may configure the default ratio to use, and default css classes to add:
php artisan vendor:publish --provider="Agatanga\Flags\FlagsServiceProvider"
vi config/flags.php
Credits
- lipis/flag-icons - Wonderful SVG flags.
- blade-ui-kit/blade-icons - Code and Idea.
Related Packages
outhebox/blade-flags
A package to easily make use of country & language flags in your Laravel Blade v...
1,043,332
312
log1x/blade-svg-sage
Composer package to add support for Blade SVG by Adam Wathan to Roots Sage.
79,966
74
rinvex/countries
Rinvex Countries is a simple and lightweight package for retrieving country deta...
8,799,814
1,743
blade-ui-kit/blade-icons
A package to easily make use of icons in your Laravel Blade views.
55,803,576
2,488
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.3.0 | ^7.3| | ^7.14| | MIT | |
| 1.2.0 | ^7.3| | ^7.14| | MIT | |
| 1.1.0 | ^7.3| | ^7.14| | MIT | |
| 1.0.10 | ^7.3| | ^7.14| | MIT | |
| 1.0.9 | ^7.3| | ^7.14| | MIT | |
| 1.0.8 | ^7.3| | ^7.14| | MIT | |
| 1.0.7 | ^7.3| | ^7.14| | MIT | |
| 1.0.6 | ^7.3| | ^7.14| | MIT | |
| 1.0.5 | ^7.3| | ^7.14| | MIT | |
| 1.0.4 | ^7.3| | ^7.14| | MIT | |
| 1.0.3 | ^7.3| | ^7.14| | MIT | |
| 1.0.2 | ^7.3| | ^7.14| | MIT | |
| 1.0.1 | ^7.3| | ^7.14| | MIT | |
| 1.0.0 | ^7.3| | ^7.14| | MIT |