public function pluckProperty($property)
    {
        $values = [];

        foreach ($this->models as $model) {
            $values []= $model->$property;
        }

        return $values;
    }
public function pluckProperty($property)
    {
        $values = [];

        foreach ($this->models as $model) {
            $values []= $model->$property;
        }

        return $values;
    }
public function pluckProperty ( $ property ) { $ values = [ ] ; foreach ( $ this -> models as $ model ) { $ values [ ] = $ model -> $ property ; } return $ values ; }
Return the value of a property for each model

@param  string $property
@return array
Return the value of a property for each model