多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
### 配置项`orderBy` > 数据列的排序 参数 1. `string|array $orderBy` > `string` 如: `id DESC` > `array` 如:`['create_at' => 'SORT_DESC', 'id' => SORT_DESC]` 示例代码: ~~~ return ViewBuilder::table() ->setPage(true) ->setHideCheckbox(false) ->setColumns([ 'password', 'username' => table_column_helper('用户名', ['style' => ['min-width' => '100px']]), 'an_mobile' => table_column_helper('电话', ['style' => ['min-width' => '100px']], function($item){ return '+' . $item['an'] . ' ' . $item['mobile']; }), 'email' => table_column_helper('邮箱', ['style' => ['min-width' => '200px']]), ]) ->setQuery(function () { $query = AdminUser::find()->select(['id', 'username', 'password', 'email', 'an', 'mobile']); return $query; }) ->setOrderBy('id DESC') ->render($this); ~~~