PHP code example of prawee / yii2-grid

1. Go to this page and download the library: Download prawee/yii2-grid library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

prawee / yii2-grid example snippets


php composer.phar 

"prawee/yii2-grid": "dev-master"

....
[
    'class'=>'prawee\grid\ActionColumn',
],
.....

....
[
    'class'=>'prawee\grid\ImageColumn',
    'attribute'=>'image',
    'options'=>[
        'width'=>'40px',
    ],
],
....

...
[
    'class'=>'prawee\grid\ActionChildColumn',
],
...

...
[
    'class'=>'prawee\grid\ActionChildColumn',
    'params'=>[
        'ref'=>Yii::$app->getRequest()->get('id'),
        'station'=>2,
    ],
],
...

....
[
    'class'=>'prawee\grid\MediaColumn',
    'attribute'=>'name',
    'format'=>'image', #image,video
    'options'=>[
        'width'=>'40px',
    ],
],
....