thienhungho / yii2-product-management
Yii2 产品管理
v1.1.1
2019-08-23 21:48 UTC
Requires
- thienhungho/yii2-app-core: *
- yiisoft/yii2: ~2.0.9
README
为 Yii2 的产品管理系统
安装
这只是一个示例,可能存在已知原因导致源代码无法工作。此源代码包含防止丢失许可证的功能。
安装此扩展的首选方式是通过 composer。
运行以下命令之一
php composer.phar require --prefer-dist thienhungho/yii2-product-management "*"
或者
"thienhungho/yii2-product-management": "*"
将以下内容添加到您的 composer.json
文件的 require 部分中。
迁移
在终端中运行以下命令进行数据库迁移
yii migrate/up --migrationPath=@vendor/thienhungho/ProductManagement/migrations
或使用命名空间迁移(需要至少 Yii 2.0.10)
// Add namespace to console config: 'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationNamespaces' => [ 'thienhungho\ProductManagement\migrations\namespaced', ], ], ],
然后运行
yii migrate/up
配置
将模块 ProductManage 添加到您的 AppConfig
文件中。
... 'modules' => [ ... /** * Product Manage */ 'product-manage' => [ 'class' => 'thienhungho\ProductManagement\modules\ProductManage\ProductManage', ], ... ], ...
模块
ProductBase, ProductManage, ProductManageForCustomer