Level 50
...->orderByRaw('DATE(created_at) DESC')...
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
created_at is stored as 2019-02-11 18:28:42 but i want to sort my data according to date only from this field.
Query is as shown below:-
$data_rem = Reminder::all()->where('user_id',Auth::user()->id)->where('is_done','0')->where('is_temp_delete','0')->sortByDesc('created_at')->sortBy('priority');
Please or to participate in this conversation.