halumein/ yii2-spending
支出模块
dev-master
2017-03-01 06:09 UTC
Requires
- php: >=5.4.0
- kartik-v/yii2-grid: *
- pistol88/yii2-tree: *
- yiisoft/yii2: *
- yiisoft/yii2-bootstrap: *
This package is not auto-updated.
Last update: 2024-09-14 19:53:08 UTC
README
支出模块
php composer require halumein/yii2-spending "*"
迁移
php yii migrate --migrationPath=vendor/halumein/yii2-spending/migrations
将模块 test 添加到应用程序配置文件中
'modules' => [ 'spending' => [ 'class' => 'halumein\spending\Module', 'userModel' => 'app\models\User', 'adminRoles' => ['superadmin', 'administrator'], 'on create' => function($event) { \Yii::$app->cashbox->addTransaction('outcome', $event->model->cost, $event->model->cashbox_id); }, ], //... ]