Laravel Community Tools by Tighten

Don't filter null records.

Submitted by fatihtoprak - 5 years ago

You can filter by NULL in Eloquent, but if you're filtering the collection further - filter
by empty string, there's no "null" in that field anymore.

$products = Products::where('is_visible is null')->get();