PHP code example of tightr / laravel-country-flags

1. Go to this page and download the library: Download tightr/laravel-country-flags library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tightr / laravel-country-flags example snippets

 php
use CountryFlag;

echo CountryFlag::get('NL'); // "🇳🇱"
 php
echo country_flag('NL'); // "🇳🇱"
 bash
$ php artisan vendor:publish --provider="Tightr\LaravelCountryFlags\CountryFlagsServiceProvider"
 php
return [
    'aliases' => [
        'AA' => 'NL',
    ],
];
 php
echo country_flag('AA'); // "🇳🇱"