public function only($attributes)
    {
        $results = [];

        foreach (is_array($attributes) ? $attributes : func_get_args() as $attribute) {
            $results[$attribute] = $this->getAttribute($attribute);
        }

        return $results;
    }
public function only($attributes)
    {
        $results = [];

        foreach (is_array($attributes) ? $attributes : func_get_args() as $attribute) {
            $results[$attribute] = $this->getAttribute($attribute);
        }

        return $results;
    }
public function only ( $ attributes ) { $ results = [ ] ; foreach ( is_array ( $ attributes ) ? $ attributes : func_get_args ( ) as $ attribute ) { $ results [ $ attribute ] = $ this -> getAttribute ( $ attribute ) ; } return $ results ; }
Get a subset of the model's attributes.

@param  array|mixed  $attributes
@return array
Get a subset of the model s attributes .