LMSouq
database Open

How to order a Laravel query builder result by multiple columns?

SO
Sophy
1 month ago
3 views
Problem Description
I want to sort multiple columns in Laravel 4 by using the method `orderBy()` in Laravel Eloquent. The query will be generated using Eloquent like this: SELECT * FROM mytable ORDER BY coloumn1 DESC, coloumn2 ASC How can I do this?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base