wherein laravel
snippet in php

laravel not in query

user7842

DB::table(..)->select(..)->whereNotIn('book_price', [100,200])->get();

laravel wher in

user6804

$users = DB::table('users')
                    ->whereIn('id', [1, 2, 3])
                    ->get();

laravel query db::raw

user3870

$someVariable = Input::get("some_variable");

$results = DB::select( DB::raw("SELECT * FROM some_table WHERE some_col = '$someVariable'") );

wherein laravel

user5858

 DB::table('user')->whereIn('id', [100,200])->get();

DB::table('users')->get();

user9389

$users = DB::table('users')->get();

laravel 8 orderby

user1001

$flights = App\Models\Flight::where('active', 1)
               ->orderBy('name', 'desc')
               ->take(10)
               ->get();