title: Eloquent Where In With Join Subquery
body: <p>I am trying to do this query in Laravel 5.4 with Eloquent and I do not get the subquery to function as it should. This is the original SQL query:</p>
  
  <pre><code>select * from projects p
          inner join projects_categories pc on p.id = pc.project_id
  where pc.name in (select pc.name from projects p
                        inner join projects_categories pc on p.id = pc.project_id
                    where p.id = $project-&gt;id) and p.id &lt;&gt; $project-&gt;id;
  </code></pre>
  
  <p>This is what I'm trying to do:</p>
  
  <pre><code> Project::join('projects_categories', 'projects.id', '=', 'projects_categories.project_id')
          -&gt;whereIn([
              ['projects_categories.name', function ($query) {
              $query-&gt;select('projects_categories.name')
                  -&gt;from('projects')
                  -&gt;join('projects_categories', 'projects.id', '=', 'projects_categories.project_id')
                  -&gt;where('project.id', '=', $project-&gt;id);
          }],
              ['projects.id', '&lt;&gt;', $project-&gt;id]
          ])
      -&gt;get();
  </code></pre>
  
  <p>But all the time I get the error back:</p>
  
  <p>Missing argument 2 for Illuminate\Database\Query\Builder::whereIn().</p>
  
  <p>Could anyone help me with this? Thank you very much for your time and help.</p>