adlino/locations

伊朗省份、县和城市,包含Laravel的Google地图位置。

0.0.1 2018-05-27 12:43 UTC

This package is auto-updated.

Last update: 2024-09-22 07:34:22 UTC


README

License Latest Stable Version Total Downloads

伊朗省份、县和城市,包含Laravel的Google地图位置。

安装

composer require adlino/locations

发布

php artisan vendor:publish --force --provider="Adlino\Locations\LocationsServiceProvider"
composer dump-autoload
php artisan locations:init

使用

// 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