Mysql
 sql >> Database >  >> RDS >> Mysql

Come usare order by in Laravel quando usa CASE WHEN?

Prova questo:

->orderByRaw(
     "CASE WHEN <CONDITION> THEN < > ELSE < > END DESC"
)