title: Laravel 5.2 WhereNotIn query
body: <p>So I Have this very large search query and I am trying to also remove any users from the search who have blocked the user searching.</p>
  
  <p>I am getting really confused and turned around and would love any assistance.</p>
  
  <p>The blocked_users table contains</p>
  
  <pre><code>id
  user_id
  blocked_user_id
  </code></pre>
  
  <p>when a user blocks another user a row is created. Now So far I am noticing if a user has not blocked anyone they are not showing up in the search at all (my guess because of the join, if the user does not exist in the table then they arnt showing up??.) </p>
  
  <p>here is a short snippet of my query</p>
  
  <pre><code>  $query = User::join('user_profiles', 'users.id', '=','user_profiles.user_id');
    $query-&gt;Join('blocked_users', 'users.id', '=', 'blocked_users.user_id');
    $query-&gt;whereNotIn('blocked_users.blocked_user_id',[Auth::user()-&gt;id])-&gt;select('users.*','user_profiles.*');
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>Ok so If my user id is 1, and user 2 does not wish for me to contact them any more or even show up in my search, They would block me which would add a row in a table </p>
  
  <p>int, user_id=2, blocked_user_id=1</p>
  
  <p>If i Do a search I dont want user 2 showing up in user 1s search.</p>
  
  <p>However with the leftJoin No users are showing up if my user id is in any row of the blocked_user_id regardless of the user who blocked me.</p>
  
  <p>I am not to sure how else I could give visual data. the whole query is quite massive and works perfectly. I am just not sure how to combine the where clause.</p>