PHP code example of nakanakaii / countries

1. Go to this page and download the library: Download nakanakaii/countries 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/ */

    

nakanakaii / countries example snippets


use Nakanakaii\Countries\Countries;

Countries::all()

Countries::findByName('United Arab Emirates')

Countries::findByCode('AE')

Countries::findByDialCode('971')

Countries::getPhoneValidatorByCode('AE')

Countries::getPhoneValidatorByDialCode('971')
bash
php artisan vendor:publish --tag=countries-flags