Laravel output:
Array ( [0] = stdClass Object ( [ID] = 5 ) [1] = stdClass Object ( [ID] = 4 ) )
Just in case somebody still lands here looking for an answer. It can be done using plain PHP. An easier way is to reverse-json the object.
function objectToArray(&$object) { return @json_decode(json_encode($object), true); }