PHP code example of sagautam5 / local-states-nepal

1. Go to this page and download the library: Download sagautam5/local-states-nepal 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/ */

    

sagautam5 / local-states-nepal example snippets


use Sagautam5\LocalStateNepal\Entities\Province;

$province = new Province('np');

// Get List of all Provinces
$provincesData = $province->allProvinces();

// Get List of All Provinces with District
$provincesData = $province->getProvincesWithDistricts();

// Get List of All Provinces with District and Districts with Municipalities
$provincesData = $province->getProvincesWithDistrictsWithMunicipalities();