title: Loop through object in Laravel
body: <p>How do I access the data in each of object when Laravel has structured it like this, I need to convert it to a normal array.</p>
  
  <p><a href="https://i.stack.imgur.com/1aUdU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1aUdU.png" alt="enter image description here"></a></p>
  
  <p>I need to retrieve the "id", "created_at", etc, etc</p>
  
  <p>Normal array:</p>
  
  <p><a href="https://i.stack.imgur.com/VCt0e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VCt0e.png" alt="enter image description here"></a></p>
  
  <p>This is my attempt</p>
  
  <pre><code>$results = array();
  
      foreach($object as $obj=&gt;$key) {
          array_push($results, $obj);
      }
  
      return $results;
  </code></pre>