title: I've assigned Laravel Query Builder to a variable. It changes when being used
body: <p>it's a WHY-question, not How-to one:)</p>
  
  <p>I have assigned a Query Bulder to a variable $query:</p>
  
  <pre><code>$query = table::where(['id'=&gt;1, 'this_version'=&gt; 1]);
  $versions['slug1'] = $query-&gt;select('tourist_id', 'tourist_version')-&gt;get()-&gt;toArray();
  print_r($versions);
  </code></pre>
  
  <p>outputs array with 2(!) sub-arrays:</p>
  
  <pre><code>Array
  (
      [slug1] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [tourist_id] =&gt; 1
                      [tourist_version] =&gt; 1
                  )
  
              [1] =&gt; Array
                  (
                      [tourist_id] =&gt; 2
                      [tourist_version] =&gt; 1
                  )
  
          )
  
  )
  </code></pre>
  
  <p>But if I add another line using $query between my $query declaration and it's usage in getting $version[2] array, my $version[2] output is shortened to a 1-dimensional array:</p>
  
  <pre><code>$query = previoustour2_tourist::where(['tour2_id'=&gt;$tour-&gt;id, 'this_version'=&gt; 1]);
  // Added line:
  $versions['slug0'] = $query-&gt;select('version_created')-&gt;first()-&gt;version_created;
  //
  $versions['slug1'] = $query-&gt;select('tourist_id', 'tourist_version')-&gt;get()-&gt;toArray();
  print_r($versions);
  </code></pre>
  
  <p>outputs (note slug1 now has only 1 nested array):</p>
  
  <pre><code>Array
  (
      [slug0] =&gt; 2017-08-08 08:25:26
      [slug1] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [tourist_id] =&gt; 1
                      [tourist_version] =&gt; 1
                  )
  
          )
  
  )
  </code></pre>
  
  <p>it seems like the like this line:</p>
  
  <pre><code>$versions['slug0'] = $query-&gt;select('version_created')-&gt;first()-&gt;version_created;
  </code></pre>
  
  <p>has added "first()" method to the original $query . Am I right and, if yes, why does it happen?</p>