1$orders = DB::table('orders')
2 ->orderByRaw('updated_at - created_at DESC')
3 ->get();
1/**
2 * Show the application dashboard.
3 *
4 * @return \Illuminate\Http\Response
5 */
6public function index()
7{
8 $messages = Message::select("*")
9 ->where('receiver_id',$id)
10 ->orderBy('created_at', 'desc')
11 ->get();
12
13 dd($messages);
14}