src/Model.php
public function toArray()
    {

        $attributes = [];

        foreach ($this->attributes as $name => $value) {
            $attributes[$name] = $this->getOriginalAttribute($name);
        }

        foreach ($this->appends as $name) {
            $attributes[$name] = $this->getAppendsAttribute($name);
        }

        return $attributes;
    }
public function toArray()
    {

        $attributes = [];

        foreach ($this->attributes as $name => $value) {
            $attributes[$name] = $this->getOriginalAttribute($name);
        }

        foreach ($this->appends as $name) {
            $attributes[$name] = $this->getAppendsAttribute($name);
        }

        return $attributes;
    }
public function toArray ( ) { $ attributes = [ ] ; foreach ( $ this -> attributes as $ name => $ value ) { $ attributes [ $ name ] = $ this -> getOriginalAttribute ( $ name ) ; } foreach ( $ this -> appends as $ name ) { $ attributes [ $ name ] = $ this -> getAppendsAttribute ( $ name ) ; } return $ attributes ; }
Get model as array
@return array
Get model as array