Laravel Eloquent ORM whereHas with a foreach loop
|Added at||2017-01-05 18:01|
Here are the relationships:
A user has many skills, there is a join table user_skills. I need to search this table to return the profiles that have the particular skill. This is part of a bigger query that is being built, so that is why there is not a ->get() on here.
Below is the query that isn't doing what I need it to. I need it to return the users who have the particular skill, based on the ID being passed in the search (the $this->misc['search_skills'] value).
Any thoughts as to what I am doing wrong or how I could execute this in a different way?