whereNotNull laravel code example
Example 1: larave whereNotNull
# whereNull
$users = DB::table('users')
->whereNull('updated_at')
->get();
# whereNotNull
$users = DB::table('users')
->whereNotNull('updated_at')
->get();
Example 2: laravel not in query
DB::table(..)->select(..)->whereNotIn('book_price', [100,200])->get();
Example 3: laravel orWhere
$camps = $field->camps()->where('status', 0)->where(function ($q) {
$q->where('sex', Auth::user()->sex)->orWhere('sex', 0);
})->get();