avikarsha / yii2-datatables
Datatables
Installs: 97
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/datatables: >= 1.9.4
- bower-asset/datatables-bootstrap3: *
- bower-asset/datatables-tabletools: *
- bower-asset/jquery: >= 1.7.0
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2025-01-02 01:46:09 UTC
README
yii2-datatables
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist avikarsha/yii2-datatable "*"
or add
"avikarsha/yii2-datatable": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?php use avikarsha\datatable\DataTables; $searchModel = new ModelSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); ?> <?= DataTables::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], //columns ['class' => 'yii\grid\ActionColumn'], ], ]);?>```