When working with pagination, how to keep orderBy [‘Goods.sort_id’ => ‘DESC’] at the top when using paginator sort.
The default value of “ORDER BY” is “sort_id desc”. But when I click on “goods_code” to sort, the query changes to: ORDER BY
goods_code asc,
sort_id desc,
How to place the value “sort_id desc” above “goods_code asc”
In the cakephp2 version I use “beforeFind” to add it to the top, but it is no longer true in the cakephp3 version.
Look forward to the support of everyone. Thank you!