PHP code example of eddmash / yii2-transpose-dataprovider

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

    

eddmash / yii2-transpose-dataprovider example snippets


use Eddmash\TransposeDataProvider;

$dataProvider = new TransposeDataProvider([
    'query'=>$dataQuery,
    'groupField'=>'rowid',
    'columnsField'=>'columns.column_name',
    'valuesField'=>'data',
    'extraFields'=>['call_data_id', 'instance.name'],
    'pagination'=>[
        'pageSize'=>4
    ]
]);