Level 75
You can do this
->orderByRaw('date(created_at) desc, time(created_at) asc')
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Is there an elqouent way to order by date and time separately. e.g. created_at order by date desc, time asc
You can do this
->orderByRaw('date(created_at) desc, time(created_at) asc')
Please or to participate in this conversation.