agatanga/flags is a Laravel package for country flags in svg format for laravel application..
It currently has 7 GitHub stars and 49.489 downloads on Packagist (latest version 1.3.0).
Install it with composer require agatanga/flags.
Discover more Laravel packages by agatanga
or browse all Laravel packages to compare alternatives.
Last updated
Country flags in SVG format for your Laravel application. Uses lipis/flag-icons icons under the hood.
composer require agatanga/flags
// 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'])
// 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']) }}
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