Magento collection get last item
Magento collection get last item : You can get magento collection last item as below.
For Magento 2 Last Item Read – Magento 2 get Last Item in Collection
Magento collection get last item Syntax
$collection = Mage::getModel('module_name/model_name') ->getCollection() ->setOrder('Id Desc') ->setPageSize('1');
The above filter will select last record from the collection.
Advertisements