public function field(string $fieldSlug)
    {
        foreach ($this->fields as $field){
            if($field->slug == $fieldSlug) {
                return $field;
            }
        }
        return null;
    }
public function field(string $fieldSlug)
    {
        foreach ($this->fields as $field){
            if($field->slug == $fieldSlug) {
                return $field;
            }
        }
        return null;
    }
public function field ( string $ fieldSlug ) { foreach ( $ this -> fields as $ field ) { if ( $ field -> slug == $ fieldSlug ) { return $ field ; } } return null ; }
Get a field by using it's slug.

@param  string $fieldSlug
@return mixed
Get a field by using it s slug .