Don't filter null records.

Submitted by fatihtoprak - 3 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();