Laravel where not null
DB::table(‘table_name’)->whereNotNull(‘column_name’)->get(); is used for where Not Null condition in laravel.
Laravel where not null clause Example
We are going to fetch data with whereNotNull clause in laravel from the table emp.
DB::table('emp')->whereNotNUll('manager_name')->get();
Will Generate query like this.
//Select * from emp where manager_name IS NOT NUll ;
Advertisements