In this article, We will explain to you how to use the WhereNotIn query in laravel(laravel eloquent WhereNotIn query example). here we will give you a simple example of laravel eloquent WhereNotIn query.
The laravel eloquent provides many types of eloquent methods. The WhereNotIn method takes two parameters column names and array. the array parameter should be a numeric array. this method reverse of WhereIn Query in Laravel.
So you can see below the following example.
$students = DB::table('students') ->WhereNotIn('id', [4, 5, 6]) ->get();
Please follow and like us: