jiejunf/laravel-locations
Composer 安装命令:
composer require jiejunf/laravel-locations
包简介
location data, flag and api for laravel.
README 文档
README
This package provide location data, flag and api for laravel.
install
composer require jiejunf/laravel-locations
resource
publish config
php artisan vendor:publish --provider="Jiejunf\\LaravelLocations\\LocationProvider"
make flags dir
Package service provider always sets flags-path into config.filesystems.links on boot.
php artisan storage:link
This script will make a symbol link in /public. You should add it into /.gitignore .
API
api routes have a prefix, setting in
locations.route. default isapi/locations/.Data can be corrected in the configuration
locations.fix_countries.
GETcountries- query:
- page
intoptionalpage number. Default no paging. - per_page
intoptionalper page count. Default 30 - sort_by
string|arrayoptionalDefault iso2 - descending
booloptionalactive if sort_by is string. Default false - sort_option
stringoptionalfor phone. Default REGULAR.- REGULAR
- STRING
- page
- query:
The API resource class can be used to modify the response content. default:
php artisan make:resource Locations/Country
Or specify in locations.api_resources
upgrade
from v1
All object types returned from the Location class are changed to array
统计信息
- 总下载量: 53
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-23