I want to check:
$collection->whereNotNull('some_col')->orWhereNotNull('some_other_col')->get();
with Query Builder, orWhereNotNull
exists, but not with Collections.
How can I then have the same functionality as orWhereNotNull
with a collection? (whereNotNull
does work with collections)
2
Answers
You can use filter with a closure:
You can’t use ->get() becasue you don’t query a DB
will work.