Download the PHP package siganushka/region-bundle without Composer
On this page you can find all versions of the php package siganushka/region-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download siganushka/region-bundle
More information about siganushka/region-bundle
Files in siganushka/region-bundle
Download siganushka/region-bundle
More information about siganushka/region-bundle
Files in siganushka/region-bundle
Vendor siganushka
Package region-bundle
Short Description Region bundle for symfony.
License MIT
Homepage https://github.com/siganushka/region-bundle
Package region-bundle
Short Description Region bundle for symfony.
License MIT
Homepage https://github.com/siganushka/region-bundle
Keywords region-bundle
Please rate this library. Is it a good library?
Informations about the package region-bundle
Region bundle for symfony
国内行政区划(省、市、区、乡/街道联动) Bundle,数据来源 Administrative-divisions-of-China
安装
使用
更新数据库映射信息:
更新行政区划数据源:
默认仅导入省、市、区三级,可使用
--with-street
参数导入乡/街道四级。
导入路由:
导入后可通过
php bin/console debug:route
查看已导入路由。
Twig(可选)
导出前端资源到项目:
页面中引用前端资源:
main.js 依赖 fetch API,如果你的浏览器不支持,请使用 fetch polyfill 。
示例
例如用户地址实体,包含省、市、区、乡/街道四级联动:
为保证此 bundle 的独立、可复用性,你的实体关联到
Region::class
时必需为单向关系,不要指定inversedBy
参数。
表单类型:
表单选项
cascader_target
指定了此字段联动的下一级字段,不管是三级还是四级,只需要指定该参数即可,此功能在main.js
中实现,如果你需要自己实现联动,则不需要导入main.js
。
All versions of region-bundle with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.4
doctrine/doctrine-bundle Version ^2.8
doctrine/orm Version ^2.11
siganushka/doctrine-contracts Version ^0.1
siganushka/generic-bundle Version ^0.6
symfony/form Version ^5.4|^6.0
symfony/framework-bundle Version ^5.4|^6.0
symfony/http-client Version ^5.4|^6.0
symfony/serializer Version ^5.4|^6.0
doctrine/doctrine-bundle Version ^2.8
doctrine/orm Version ^2.11
siganushka/doctrine-contracts Version ^0.1
siganushka/generic-bundle Version ^0.6
symfony/form Version ^5.4|^6.0
symfony/framework-bundle Version ^5.4|^6.0
symfony/http-client Version ^5.4|^6.0
symfony/serializer Version ^5.4|^6.0
The package siganushka/region-bundle contains the following files
Loading the files please wait ....