public function getLabelText($field_key)
    {
        $field = $this->getField($field_key);
        if (!is_array($field)) {
            return null;
        }

        return (array_key_exists('label', $field))
            ? $field['label']
            : Str::human(str_replace('-', ' ', preg_replace('/_id$/i', '', $field_key)));
    }
public function getLabelText($field_key)
    {
        $field = $this->getField($field_key);
        if (!is_array($field)) {
            return null;
        }

        return (array_key_exists('label', $field))
            ? $field['label']
            : Str::human(str_replace('-', ' ', preg_replace('/_id$/i', '', $field_key)));
    }
public function getLabelText ( $ field_key ) { $ field = $ this -> getField ( $ field_key ) ; if ( ! is_array ( $ field ) ) { return null ; } return ( array_key_exists ( 'label' , $ field ) ) ? $ field [ 'label' ] : Str :: human ( str_replace ( '-' , ' ' , preg_replace ( '/_id$/i' , '' , $ field_key ) ) ) ; }
Get the label text for a field
@param mixed $field_key Alternatively, you can pass in the field array
@return string
Get the label text for a field