fgh151/yii2-grid
最新稳定版本:v0.0.4
Composer 安装命令:
composer require fgh151/yii2-grid
包简介
Grid view with switchable columns
关键字:
README 文档
README
Grid view with swithcable columns
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist fgh151/yii2-grid "*"
or add
"fgh151/yii2-grid": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
use fgh151\yii\grid\GridView; /** * @var $dataProvider yii\data\ActiveDataProvider * @var $searchModel \yii\db\ActiveRecord */ $availableColumns ['id', 'email', 'firstname', 'lastname']; $defaultColumns = ['id', 'email']; echo GridView::widget([ 'dataProvider' => $dataProvider, // required 'filterModel' => $searchModel, // default is null 'defaultColumns' => $defaultColumns, // default is [], if you want to use default columns 'availableColumns' => $availableColumns, // default is [], if you want to use default columns ]);
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-10