title: Laravel Eloquent can't use where not to query relationship
body: <p><strong>My problem:</strong> I can't seem to use <code>where('user_id', '&lt;&gt;', Auth::id()</code> on a relationship collection using Laravel's Eloquent ORM.</p>
  
  <p>In Laravel 5, I have a database with the following schema:</p>
  
  <pre><code>| USERS    | JOBS    | CONVERSATIONS | MESSAGES        | CONVERSATION_USER |
  | id       | id      | id            | id              | conversation_id   |
  | username | user_id | job_id        | conversation_id | user_id           |
  | password | title   |               | user_id         |                   |
  |          |         |               | message         |                   |
  </code></pre>
  
  <p>and with the following relationships:</p>
  
  <pre><code>User model:
  $jobs = $this-&gt;hasMany('job');
  $messages = $this-&gt;hasMany('message');
  $conversations = $this-&gt;belongsToMany('conversation');
  
  Job model:
  $user = $this-&gt;belongsTo('user');
  $conversations = $this-&gt;hasMany('conversation');
  $messages = $this-&gt;hasManyThrough('message', 'conversation');
  
  Conversation model:
  $job = $this-&gt;belongsTo('job');
  $messages = $this-&gt;hasMany('message');
  $user = $this-&gt;belongsToMany('user');
  
  Message model:
  $user = $this-&gt;belongsTo('user');
  $conversation = $this-&gt;belongsTo('conversation');
  </code></pre>
  
  <p>I'm trying to get the number of messages for a job, which have not been posted by the authenticated user. My code is:</p>
  
  <pre><code>// Load all of the jobs which relate to the logged in user
  $jobs = Job::with(['messages'])-&gt;where('user_id', Auth::id())-&gt;OrderBy('id', 'DESC')-&gt;get();
  
  foreach ($jobs as $job)
  {
      // Count all messages that have not been sent by the logged in user
      echo $job-&gt;messages-&gt;where('user_id', '&lt;&gt;', Auth::id())-&gt;count().'&lt;br /&gt;';
  }
  </code></pre>
  
  <p>However I just cannot get the count function to work.</p>