I've been looking for the same functionality of eloquent orWhere()
but in collection. I just found that I can chain multiple where()
but I haven't found something like orWhere()
.
So basically the question is, is there a way to achieve something like orWhere()
in collections?
You have 2 solutions for this:
->filter
& add your own conditions->where()
then use ->merge
to
make the final collectionIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With