Where null and Where not null laravel eloquent query

if you write query for SQL then it is very easy syntax and families with where null and not null condition.Where Null And Where Not Null Laravel Eloquent Query If you want to check where should elements are added in SQL then you need to write query which have a use with where clauses.Lets start with it.Query with where clausesLet’s start with a queryfor.Where Null And Where Not Null Laravel Eloquent Query.

Where Null And Where Not Null Laravel Eloquent Query people like me who write SQL or PHP when we are using SQL then i am speaking about perl or php and you can easily check it where null and not null condition.
what does new signature mean in perl?


Because perl does not have a seperate punctuation, new signature means you do not need that has or has not because you know that it has or has not and it is equal with this symbol.
i believe that.

FIRST SOLUTION 1:

1) IS NULL = whereNull()

FIRST SOLUTION 2:

2) IS NOL NULL = whereNotNull()

Where Null Query:

SQL Query:

SELECT * FROM posts WHERE email IS NULL;

Laravel Query:

DB::table('posts')
    ->whereNull('email')	
    ->get();

Where Not Null Query:

SQL Query:

SELECT * FROM posts WHERE email IS NOT NULL;

Laravel Query:

DB::table('posts')
    ->whereNotNull('email')	
    ->get();

Leave a Comment