This will work for an independent "wherein", but if there are already existing wheres then the original where queries won't be applied to the wheres from the whereins which are being added, since they're being appended as an 'or'.
would make four find requests. The first would be 'flagged' and 'cat' and then there would be one additional find request per fur color. Instead, we should have three find requests with the flagged and type properties applied to each fur color.
This will work for an independent "wherein", but if there are already existing wheres then the original where queries won't be applied to the wheres from the whereins which are being added, since they're being appended as an 'or'.
For example
Pet::where('flagged', true)->where('type', 'cat')->whereIn('fur_color', ['white', 'orange', 'black'])->get()
would make four find requests. The first would be 'flagged' and 'cat' and then there would be one additional find request per fur color. Instead, we should have three find requests with the flagged and type properties applied to each fur color.