I saw tutorials on the internet that the way you had to make a IS NULL
is as follows:
Remessa::where('campo', 'IS', DB::raw('NULL'))->get();
But I was wondering about this, because if an ORM is usually developed thinking of creating a way to query data that is compatible with all DBMS.
Although it works, I believe the form highlighted above is not essential.
With Eloquent
, is there any method (without being highlighted above) that I can make a where
by doing the condition IS NULL
or IS NOT NULL
?
I think this current way ends up getting repetitive.