As I work on my web app using Laravel, I have encountered an issue where I need to scroll down to see the newest messages when there are many conversations. Here is how the chats display on page load
I want to focus on displaying the newest message first. Like this
This is the code snippet causing the issue:
//
$conversations=Conversation::where('s_id',auth()->user()->id)
enter code here
->orWhere('r_id',auth()->user()->id)->orderBy('updated_at','desc')->get();