PHP code example of isavon / yii2-grid

1. Go to this page and download the library: Download isavon/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/ */

    

isavon / yii2-grid example snippets


<?= GridView::widget([
    'dataProvider' => $dataProvider,
    'summary' => false,
    'columns' => [
        'id',
        'name',
        'url',
        [
            'class' => 'isavon\grid\ActionColumn',
            'template' => '{images} {update} {delete}',
            'urls' => function($model) {
                return [
                    'images' => Url::to(['work-image/index', 'workid' => $model->id]),
                ];
            },
            'contentOptions' => ['class' => 'text-center'],
            'header' => 'Actions',
        ]
    ]
])