PHP code example of sun / country

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

    

sun / country example snippets



$country = new Sun\Country;
$country->get();

$country = new Sun\Country;
$country->get('BD');

$country = new Sun\Country;
$country->get(['BD', 'US']);

$country = new Sun\Country;
$country->bd;

$country = new Sun\Country;
$country->getName('BD');

$country = new Sun\Country;
$country->getDialingCode('BD');

$country = new Sun\Country;
$country->getCountryNameByGeoIp('203.202.251.42');

Sun\Provider\CountryServiceProvider::class,

'Country'   =>  Sun\Facade\CountryFacade::class,

Sun\Provider\CountryProvider::class,

'Country'   =>  Sun\Alien\CountryAlien::class,