Download the PHP package yupoxiong/region without Composer

On this page you can find all versions of the php package yupoxiong/region. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package region

ThinkPHP省市区(县)街道四级联动扩展

支持 TP5.0.*TP5.1.* 还有 TP6.0 ,搜索功能支持汉字,支持拼音,首字母搜索。

安装

第一步:安装扩展

Composer 运行扩展安装命令

第二步:创建数据表

复制vendor/yupoxiong/region/database/migrations目录下的数据库迁移文件到TP迁移目录(一般是 /database/migrations/ ),然后运行TP自带迁移命令创建表。

TP5.1 版本可以直接运行以下两个命令完成安装

TP6.0 版本可以直接运行以下命令完成安装

添加路由

TP5.0 在 /application/route.php 中追加,TP5.1 在 /route/route.php 中追加。

TP6.0版本已经去掉别名路由,可以在路由配置里添加以下路由(多应用模式在应用路由里添加):

使用

获取地区(最常用的方式)
获取省
获取市
获取区
获取街道
搜索地区
搜索省
搜索市
搜索区
搜索街道

可选配置

可在配置文件中添加以下配置,5.0.* 在 /application/config.php 中追加。

5.1.* 和 6.0 直接运行以下命令即可在 config 目录下生成 region.php 配置文件。

Facade

TP5.1 和 TP6.0 可以在开发中直接使用以下代码获取数据:

测试相关

安装配置好之后可以将vendor/yupoxiong/region/tests/region.html放到项目public目录下访问测试扩展是否可用

点此查看demo


All versions of region with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yupoxiong/region contains the following files

Loading the files please wait ....