Closed kticka closed 6 years ago
I'm working with Eloquent ORM and this is very helpful. Sometimes you have array of key/value conditions and it's very helpful when you can pass them at once and reuse multiple times instead chaining query with bunch of wheres.
@kticka the risk can be that your code wont be very readable. To keep code simple I suggest to change the signature by checking if array but move that part to own method. Further for approvement a unit-test should be part of your pull request together with small documentation for how to use.
Sorry @kticka, closing it for now, as it's not a priority right now to add new features. But this can come in the future with a cleaner implementation.
@kticka I have no idea why this can be very helpful, because you can chain easy the where statements. Anyway I think it is better to create a easy new function with good name instead of making a function more complex with if and elses. Last, unit-test is missing.