dantepiazza/geo-location-data 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dantepiazza/geo-location-data

最新稳定版本:v1.0.3

Composer 安装命令:

composer require dantepiazza/geo-location-data

包简介

README 文档

README

A JSON library to display countries, states, counties and cities with PHP.

NOTE: This package is under development and should not use ID values as final

Usage

use Dantepiazza\GeoLocationData\Location;

$location = new Location();

// Regenerata a chache file
$location -> cache();

// Search locations by city name
$location -> search('Buenos Ai');

// Get location by city name
$location -> get(6344);

// Returns only the list of countries
$location -> countries();

// Get country by id
$location -> country('id', 11);

// Returns only the list of states
$location -> states();

// Get state by id
$location -> state(788);

// Returns only the list of counties in the country code
$location -> counties('AR');

// Get county by id
$location -> county('AR', 216);

// Returns only the list of cities in the country code
$location -> cities('AR');

// Get city by id
$location -> city('AR', 4867);

Responses

Location data
country_id: int
country_name: string
country_code: string
state_id: int
state_name: string
county_id: int
county_name: string
city_id: int
city_name: string
zip_code: string
name: string
Country data
id: int
code: string
name: string
State data
id: int
country_id: int
name: string
County data
id: int
country_id: int
state_id: int
name: string
City data
id: int
country_id: int
state_id: int
county_id: int
zip_code: string
name: string

统计信息

  • 总下载量: 29
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-08-27