Laravel where not between


DB::table(‘table_name’)->whereNotBetween(‘column_name’,[value1,value2])->get(); is used for where NotBetween condition in laravel.


Laravel where Not Between clause Example

We are going to fetch data with whereNotBetween clause in laravel from the table emp.

DB::table('emp')->whereNotBetween('salary',[10000,20000])->get();

Will Generate the following query.

//Select * from emp where salary NOT BETWEEN 10000 AND 20000 ;


Advertisements

Add Comment

📖 Read More