PHP code example of egor260890 / yii2-sort-extension
1. Go to this page and download the library: Download egor260890/yii2-sort-extension 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/ */
egor260890 / yii2-sort-extension example snippets
use egor260890\sort\Sort;
class myclass{
use Sort;
protected function getSortAttribute(): string
{
return 'sort_id';
}
protected function getSortGroupAttributes(): array
{
return [];
}
}