orderbyDesc laravel code example
Example 1: laravel order by desc
$posts = Post::orderBy('id', 'DESC')->get();
Example 2: order By Asc in laravbel
->orderBy('id', 'DESC');
Example 3: laravel not in query
DB::table(..)->select(..)->whereNotIn('book_price', [100,200])->get();
Example 4: DB::table('users')->get(); id 1
$users = DB::table('users')where('id','=', $userid)->get();
Example 5: laravel 8 orderby
$flights = App\Models\Flight::where('active', 1)
->orderBy('name', 'desc')
->take(10)
->get();