public function pluckFields($property = 'name')
    {
        $names = [];

        if ($this->hasFields()) {
            foreach ($this->getFields() as $field) {
                if (property_exists($field, $property)) {
                    $names[] = $field->{$property};
                }
            }
        }

        return $names;
    }
public function pluckFields($property = 'name')
    {
        $names = [];

        if ($this->hasFields()) {
            foreach ($this->getFields() as $field) {
                if (property_exists($field, $property)) {
                    $names[] = $field->{$property};
                }
            }
        }

        return $names;
    }
public function pluckFields ( $ property = 'name' ) { $ names = [ ] ; if ( $ this -> hasFields ( ) ) { foreach ( $ this -> getFields ( ) as $ field ) { if ( property_exists ( $ field , $ property ) ) { $ names [ ] = $ field -> { $ property } ; } } } return $ names ; }
Extracts the given property name from the fields

@return array
Extracts the given property name from the fields