php - Eloquent sortBy - Specify asc or desc -


trying sort eloquent collection:

$collection->sortby('field'); 

there no information in laravel 4's docs on how choose descending or ascending sort method.

is possible?

http://laravel.com/api/4.1/illuminate/database/eloquent/collection.html#method_sortby

$collection->sortby('field', [], true);//true descending


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

javascript - Bootstrap Popover: iOS Safari strange behaviour -