Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How to use multiple order by in laravel

+4 votes
asked Nov 18, 2019 by (200 points)
retagged Nov 23, 2019 by

1 Answer

0 votes
answered Sep 27, 2024 by Arul Greeshmanth (140 points)

just use the Order by method for two times

for example:  columns: $posts = Post::orderBy('title', 'desc') ->orderBy('published_at', 'asc') ->get();

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...