定制 softedge/yii2-countries 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

softedge/yii2-countries

Composer 安装命令:

composer require softedge/yii2-countries

包简介

Model and migration to add countries to your yii2 app

README 文档

README

  1. Introduction

Yii2 Countries --- Multilingual extension for the Yii2 framework, which provides a list of all countries and their demonym, plus a migration file and an AR model.

  • Requires agroxy/yii2-multilingual (Github)
  • Multilanguage support
  1. Dependencies
  • php >= 7.0
  • composer
  • MySql >= 5.5
  • agroxy/yii2-multilingual
  1. Installation

Via composer:

composer require "softedge/yii2-countries": "^1.1.0"

or add the following in section require of composer.json:

"require": {
    "softedge/yii2-countries": "^1.1.0"
}

and run command composer install,

or command composer update, if all yii2 project extensions are already installed.

  1. Usage

Main properties

The namespace for classes: slayvin\countries.

Application config

To add the tables to the database, run the provided migration:

'controllerMap' => [
        'migrate' => [
            'class' => yii\console\controllers\MigrateController::class,
            'migrationNamespaces' => [
                'slayvin\countries\migrations'
            ],
        ]
    ],

If you need multilingual support, add the languages in your app config params:

...
'languages' => ['en',...]
...

Database tables

Country table "countries"

iso selectable default
AD 0 0
AE 0 0
... ... ...
ZW 0 0

Translation table "countries_lang"

country_iso language name demonym
AD en Andorra Andorran
AE en United Arab Emirates Emirati
... ... ... ...
ZW fr Zimbabwe Zimbabwéen-ne

Here, we have:

  • non-multilingual fields: iso, selectable, default
  • multilingual fields: name, demonym

License

Licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-10-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固