cakephp分页排序先降序

cakephp分页排序先降序,php,cakephp,pagination,Php,Cakephp,Pagination,默认情况下,当您单击分页中的排序字段时,它将首先升序排序,是否有方法将其设置为先降序 <th><?php echo $this->Paginator->sort('Views', 'views'); ?></th> 我希望我的用户在单击“查看-排序-非最少查看”后首先查看查看次数最多的内容。若要将默认排序方向设置为降序,请将上面的代码更改为: <th><?php echo $this->Paginator->so

默认情况下,当您单击分页中的排序字段时,它将首先升序排序,是否有方法将其设置为先降序

<th><?php echo $this->Paginator->sort('Views', 'views'); ?></th>


我希望我的用户在单击“查看-排序-非最少查看”后首先查看查看次数最多的内容。

若要将默认排序方向设置为降序,请将上面的代码更改为:

<th><?php echo $this->Paginator->sort('Views', 'views, array('direction' => 'desc')); ?></th>