PHP code example of srun / provider

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

    

srun / provider example snippets


composer 

"srun/provider":"*"

return new \srun\provider\ApiDataProvider([
    'allModels' => $data, /*@var array 数据源*/
    'totalCount' => $totalCount, /*@var int 总数*/
    'pagination' => [
        'pageSize' => 10, /*@var int 分页大小*/
    ],
]);