In this article, We will explain to you how to use whereNotBetween query in laravel(where not between in laravel query). The laravel eloquent provides many types of eloquent methods. the whereNotBetween method will return data column’s value is between outside two values.
So you can see below the following example.
$students = DB::table(‘students’)
->whereNotBetween(‘id’, [1, 20])