I have an array as collection and ordered it in ascending order with respect to expiry date as below:
$creditDetails = $this->_creditFactory->create()->addFieldToFilter('customer_id', 1)->setOrder('date_expires', 'asc');
I have some records which do not have any expiry date i.e NULL
I want such records to come in the collection at the end of or after the records which have some expiry date. Now, records without an expiry date are executing first.
How can I do this?