Laravel Order по Desc
$posts = Post::orderBy('id', 'DESC')->get();
Akram Bahluol
$posts = Post::orderBy('id', 'DESC')->get();
->orderBy('id', 'DESC');
$users = DB::table('users')
-> orderBy('name', 'desc')
-> get();
$affected = DB::table('users')
->where('id', 1)
->update(['votes' => 1]);
DB::table(..)->select(..)->whereNotIn('book_price', [100,200])->get();
// Make sure column names are correct
$inquiries = Inquiry::orderBy('status', 'ASC')
->orderBy('created_at', 'DESC')
->get();