I'd like every Model->find('list')
could return the array ordered by the $displayField
set on Model. Is there a way to do this beyond set 'order' => 'Model.display_field ASC'
on every find call?
Yes, just set $order
in the model.
http://book.cakephp.org/2.0/en/models/model-attributes.html#order
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.