Closed oaaron99 closed 3 years ago
Hey @oaaron99,
thanks for reporting this.
Indeed there was a little bug so the select
method returned an array instead of a collection.
The bug is now fixed with the latest version of the package (v2.4.6) in commit aaaf7da764553f4318688266db0850c5164b25f2.
So feel free to install the latest version to get rid of the bug. Sorry for the inconvenience.
I'm just starting to get familiar with using your package and so far everything is good except I have run into an error when trying to combine a select with a where on a basic query.
The following query:
Results in this error:
I don't know if I am doing something wrong but this query seems fine and follows closely to the examples provided in the README.
It seems the source of the error is that when the
fields
key exists in the $builder->query collection it is returning an array instead of a collection and then calling $select->contains when $select is an array.Removing the select or even moving it after the where clause results in a working query.
Both of the following result in no errors:
Any insight would be greatly appreciated