adlino / locations
Iran Provinces, Counties and Cities with a Google Map Location for Laravel.
Installs: 1 294
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 1
Forks: 4
Open Issues: 0
Requires
- php: >=7.0.0
This package is auto-updated.
Last update: 2024-11-22 07:46:07 UTC
README
Iran Provinces, Counties and Cities with a Google Map Location for Laravel.
Installation
composer require adlino/locations
Publish
php artisan vendor:publish --force --provider="Adlino\Locations\LocationsServiceProvider"
composer dump-autoload
php artisan locations:init
Usage
// 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