PHP code example of eelcol / laravel-country-iso
1. Go to this page and download the library: Download eelcol/laravel-country-iso 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/ */
eelcol / laravel-country-iso example snippets
`
use Eelcol\LaravelCountryIso\CountryIso;
class SomeController
{
public function view(CountryIso $countryIso)
{
$countryIso->getCountries();
}
}
`
use Eelcol\LaravelCountryIso\Facades\CountryIsoFacade;
class SomeController
{
public function view()
{
CountryIsoFacade::getCountries();
}
}
CountryIsoFacade::getCountryFromIso('NL'); // -> Country instance
CountryIsoFacade::getCountryFromIso('unknown'); // -> null
php composer.phar