I have this code in cakePHP
$this->paginate = [
'sortWhitelist' => [
'Companies.name',
'Grants.shortname',
'amount',
'contact',
'LatestHistory.Histories__deadline',
'Statuses.name'
],
'order' => [
'LatestHistory.Histories__deadline' => 'ASC',
'Statuses.await' => 'DESC',
'Statuses.name'
]
];
It orders by Histories deadline ASC, but the nulls come first, than the another records, where Histories deadline is not null. I would like, if the ASC list would be in the first place, than the nulls. How can I resolve this issue?
Thanks