src/Database/Model.php
public function __toArray()
    {
        $data = array();

        foreach (static::schema() as $field => $options) {
            $data[$field] = $this->{$field};
        }

        return $data;
    }
public function __toArray()
    {
        $data = array();

        foreach (static::schema() as $field => $options) {
            $data[$field] = $this->{$field};
        }

        return $data;
    }
public function __toArray ( ) { $ data = array ( ) ; foreach ( static :: schema ( ) as $ field => $ options ) { $ data [ $ field ] = $ this -> { $ field } ; } return $ data ; }
Returns the models properties in a key => value array.

@return array
Returns the models properties in a key = > value array .