spicytuna8/yii2-ajaxcrud-bs5
最新稳定版本:v1.0.1
Composer 安装命令:
composer require spicytuna8/yii2-ajaxcrud-bs5
包简介
Gii CRUD template for Single Page Ajax Administration for yii2
README 文档
README
Original work by johitvn. Gii CRUD template for Single Page Ajax Administration for yii2
![yii2 ajaxcrud extension screenshot]
Features
- Create, read, update, delete in onpage with Ajax
- Bulk delete suport
- Pjax widget suport
- Export function(pdf,html,text,csv,excel,json)
Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist spicytuna8/yii2-ajaxcrud-bs5 "*"
or add
"spicytuna8/yii2-ajaxcrud-bs5": "*"
to the require section of your composer.json file.
Usage
For first you must enable Gii module Read more about Gii code generation tool
Because this extension used kartik-v/yii2-grid extensions so we must config gridview module before
Let 's add into modules config in your main config file
'modules' => [ 'gridview' => [ 'class' => '\kartik\grid\Module' ] ]
Add translation to the config
'components' => [ 'i18n' => [ 'translations' => [ 'yii2-ajaxcrud' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@yii2ajaxcrud/ajaxcrud/messages', 'sourceLanguage' => 'en', ], ] ] ]
Add bsVersion to the params file
return [ 'bsVersion' => '5.x', ];
Redirect URL feature for make redirect after
if($model->load($request->post()) && $model->save()){ return ['forceClose'=>true,'forceRedirect'=>"./view?id=$model->id"]; }
You can then access Gii through the following URL:
http://localhost/path/to/index.php?r=gii
and you can see Ajax CRUD Generator
统计信息
- 总下载量: 34
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-05-12