jeudi 21 mai 2020

Laravel ORDER BY

In Laravel when we order(ORDER BY) our records by multiple fields, is it possible that we should give priority to one of the field that we want to order it.

Ex: Is it possible that we should give priority to email?

User::orderBy('name', 'DESC')
->orderBy('email', 'ASC')
->get();


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Tslfx6
via IFTTT

Aucun commentaire:

Enregistrer un commentaire