chg: [auditlogs:index] Reverse sort by ID
parent
f37cea1cad
commit
8d26be28a2
|
@ -20,6 +20,7 @@ class AuditLogsController extends AppController
|
|||
{
|
||||
$this->CRUD->index([
|
||||
'contain' => $this->containFields,
|
||||
'order' => ['AuditLogs.id' => 'DESC'],
|
||||
'filters' => $this->filterFields,
|
||||
'quickFilters' => $this->quickFilterFields,
|
||||
'afterFind' => function($data) {
|
||||
|
|
|
@ -69,6 +69,9 @@ class CRUDComponent extends Component
|
|||
if (!empty($options['fields'])) {
|
||||
$query->select($options['fields']);
|
||||
}
|
||||
if (!empty($options['order'])) {
|
||||
$query->order($options['order']);
|
||||
}
|
||||
if ($this->Controller->ParamHandler->isRest()) {
|
||||
$data = $query->all();
|
||||
if (isset($options['hidden'])) {
|
||||
|
|
Loading…
Reference in New Issue