title: Laravel - Stop multiple queries chaining
body: <p>I currently have functionality to get some statistics back from my database, using the Query Builder, not Eloquent.</p>
  
  <p>Lets say I want to get a count of the number of users who have an iOS token, and then users who have an android token in one of my tables.</p>
  
  <pre><code>class Connection {
      public function __construct()
      {
          return $this-&gt;db = DB::connection('database_one');
      }
  }
  
  class Statistics extends Connection {
      public function devices()
      {
          $this-&gt;devices = $this-&gt;db-&gt;table('users_devices');
  
          $arr = [
              'ios' =&gt; $this-&gt;devices-&gt;where('ios_push_token', '!=', '')-&gt;count(),
              'android' =&gt; $this-&gt;devices-&gt;where('android_push_token', '!=', '')-&gt;count(),
          ];
  
          return $arr;        
      }
  }
  </code></pre>
  
  <p>The query to get the <code>ios</code> devices is correct:</p>
  
  <pre><code>select count(*) as aggregate from `users_devices` where `ios_push_token` != ?
  array (size=1)
        0 =&gt; string '' (length=0)
  </code></pre>
  
  <p>However, I then hit an issue with the <code>android</code> value, the query tries to execute:</p>
  
  <pre><code>select count(*) as aggregate from `users_devices` where `ios_push_token` != ? and `android_push_token` != ?
  array (size=2)
    0 =&gt; string '' (length=0)
    1 =&gt; string '' (length=0)
  </code></pre>
  
  <p>It seems to be chaining the where clause from the first query onto the second query, and so on for multiple instances of this giving me incorrect data.</p>
  
  <p>I think it's something to do with using the one instance of <code>DB::connection</code>, but I'm not sure?</p>