title: Laravel 4.1 Raw Query accessing result
body: <p>I'm using the Haversine formula to create a nearby function in laravel 4.1, my raw query:</p>
  
  <pre><code>    $haversine = '(3959 * acos(cos(radians(' . $lat . ')) * cos(radians(lat)) * cos(radians(lng) - radians(' . $lng . ')) + sin(radians(' . $lat . ')) * sin(radians(lat))))';
  
      $places = DB::table('b_details')
          -&gt;select(DB::raw($haversine . ' as distance'))
          -&gt;orderBy('distance', 'ASC')
          -&gt;having('distance', '&lt;', $radius)
          -&gt;get();
  
      foreach ($places as $place) {
          var_dump($place);
      }
  </code></pre>
  
  <p>this only returns the result of the calculation like so: </p>
  
  <pre><code>object(stdClass)[231]
    public 'distance' =&gt; float 0.037140269070672
  object(stdClass)[232]
    public 'distance' =&gt; float 0.093237928677323
  object(stdClass)[233]
    public 'distance' =&gt; float 0.4404396657947
  </code></pre>
  
  <p>I'm unable to access anymore data, for example: </p>
  
  <pre><code>    foreach ($places as $place) {
          var_dump($place-&gt;name);
      }
  </code></pre>
  
  <p>produces this error: </p>
  
  <pre><code> Undefined property: stdClass::$name
  </code></pre>
  
  <p>Any help is appreciated, thank you.  </p>