liumapp / yii2-library
common library for yii2
v1.0.0
2017-04-19 00:31 UTC
Requires
- php: >=5.4.0
- bower-asset/bootstrap-datepicker: v1.6.4
- bower-asset/bootstrap3-wysihtml5-bower: *
- bower-asset/echarts: 3.3.2
- bower-asset/eonasdan-bootstrap-datetimepicker: v4.14.30
- bower-asset/fontawesome: 4.7
- bower-asset/pace: ^1.0
- bower-asset/select2: 4.0.3
- bower-asset/ztree_v3: v3.5.26
- yiisoft/yii2: 2.0.10
- yiisoft/yii2-bootstrap: 2.0.6
This package is not auto-updated.
Last update: 2025-03-30 05:30:46 UTC
README
common library for yii2
修改配置文件
file: config/web.php,config/console.php
'modules' => [ 'library'=>[ 'class'=>'liumapp\library\Module' ], ],
初始化基本数据库
php yii migrate --migrationPath=@vendor/liumapp/yii2-library/migrations
创建管理员
php yii library/create-admin 管理员 $username $password $youremail
批量删除
liumapp\library\widgets\BatchDelete::widget()
默认使用当前控制器下的ActionDelete 也可以手动指定 /attachment/default/delete ,然后根据主键id实现批量删除
liumapp\library\widgets\BatchDelete::widget(['url'=>'attachment/default/delete
'])
必须跟GridView配合使用,把多选框显示出来
'columns' => [
['class' => CheckboxColumn::className()],
'entityId',
['class' => 'liumapp\library\components\ActionColumn'],
],