public function toArray()
    {
        $collection = [];

        $this->recursive(
            $this->storage,
            function ($value, $key) use (& $collection) {
                if (is_object($value)) {
                    $collection[$key] = (array) $value;
                } else {
                    $collection[$key] = $value;
                }
            }
        );

        return $collection;
    }
public function toArray()
    {
        $collection = [];

        $this->recursive(
            $this->storage,
            function ($value, $key) use (& $collection) {
                if (is_object($value)) {
                    $collection[$key] = (array) $value;
                } else {
                    $collection[$key] = $value;
                }
            }
        );

        return $collection;
    }
public function toArray ( ) { $ collection = [ ] ; $ this -> recursive ( $ this -> storage , function ( $ value , $ key ) use ( & $ collection ) { if ( is_object ( $ value ) ) { $ collection [ $ key ] = ( array ) $ value ; } else { $ collection [ $ key ] = $ value ; } } ) ; return $ collection ; }
Returns the elements of the collection in table format

@return array
Returns the elements of the collection in table format