PHP code example of adlino / locations
1. Go to this page and download the library: Download adlino/locations 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/ */
adlino / locations example snippets
// get all provinces
$provinces = Locations::getAllProvinces(); // return approved provinces
// get all counties
$counties = Locations::getAllCounties(); // return approved counties
// get all cities
$cities = Locations::getAllCities(); // return approved cities
// get cities of province
$cities = $province->getCities();
// get counties of province
$counties = $province->getCounties();
// get area code of tehran province
$areaCode = $province->getAreaCode(); // 021
bash
php artisan vendor:publish --force --provider="Adlino\Locations\LocationsServiceProvider"
composer dump-autoload
php artisan locations:init