samedi 30 avril 2016

Order by descending the upadated_at column in laravel 5

$notif = DB::table('notifications')->orderBy('updated_at', 'desc')->get();

Above code is to get the values in descending order according to the default column updated_at in laravel 5. Although that will display the values ascending order. How to correct that?

Last column of this picture indicates the updated_at column. There I need to get the row which has the recent updated time first. How to solve that?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1QIlc4h
via IFTTT

Aucun commentaire:

Enregistrer un commentaire