On the Flags and Emoji page you can find everything you need to know about
::: tip
More in Flags Emoji
:::
To get a flag, use the following code:
use Lwwcas\LaravelCountries\Models\Country;
$country = Country::inRandomOrder()->first();
$country->getFlagEmoji();
// Output 🇵🇹
For each of these formats, we provide dedicated getters and where methods to make their usage even easy-to-use and more convenient for you.
use Lwwcas\LaravelCountries\Models\Country;
$country = Country::inRandomOrder()->first();
$country->getFlagEmoji();
// Output 🇵🇹
use Lwwcas\LaravelCountries\Models\Country;
$country = Country::inRandomOrder()->first();
$country->getFlagEmojiUCode();
// Output U+1F1F5 U+1F1F9
use Lwwcas\LaravelCountries\Models\Country;
$country = Country::inRandomOrder()->first();
$country->getFlagEmojiShortCode();
// Output :flag-pt:
How can I help you explore Laravel packages today?