title: Laravel 5 Eloquent Model Results
body: <p>I am using eloquent model to retrieve data from database.My query<br/></p>
  
  <pre><code>$tests_details = Previous_Mocks::where($data)-&gt;orderBy('sno', 'desc')-&gt;get();
  </code></pre>
  
  <p>As of my knowledge <code>$tests_details</code> will return array of objects(results) but when i echo <code>is_array($tests_details)</code> it is returning false which means it's not an array but when i echo <code>count($test_details)</code> it is showing the correct count.See below code<br/></p>
  
  <pre><code>foreach ($tests_details as $td)
                  {
                      echo is_object($td);
                      echo "&lt;br/&gt;";
                  }
  </code></pre>
  
  <p>it is returing 1 for <code>is_object($td)</code>. When i print <code>$tests_details</code> using <code>print_r</code> function below is the output i am getting
  <a href="https://i.stack.imgur.com/SBrbH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SBrbH.jpg" alt="enter image description here"></a></p>
  
  <p>and when is echo <code>$tests_details[0]-&gt;edate</code> it is showing proper output and everything working fine. But i want to know why the <strong>eloquent</strong> returned the data in the format shown in image instead of normal objects. I am new to laravel and currently using laravel 5.0 any explanation is appreciable.</p>