PHP code example of omisai / laravel-countries
1. Go to this page and download the library: Download omisai/laravel-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/ */
omisai / laravel-countries example snippets
use Omisai\Countries\Collection;
$countries = app(Collection::class);
$names = $countries->getCountriesName();
$countries = app('countries');
use Omisai\Laravel\Countries\Facades\Countries;
$names = Countries::getCountriesName();
$hungary = Countries::getCountryByAlpha2('HU');