My first guess is that the column isn't of date type in your database table.
As for two orders, you can just chain method calls, like so:
User::orderBy('created_at', 'desc')->orderBy('something', 'asc');
Hope I could help.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
it seems that order by date descending is not working. I've tried order by id and it works. How can i make it work on order by date. And also how can i make two order by in one query.
Please Advise.
Thanks.
Please or to participate in this conversation.