public function formatLabel($name)
    {
        if (!$name) {
            return null;
        }

        if ($this->translator->has($name)) {
            $translatedName = $this->translator->get($name);

            if (is_string($translatedName)) {
                return $translatedName;
            }
        }

        return ucfirst(str_replace('_', ' ', $name));
    }
public function formatLabel($name)
    {
        if (!$name) {
            return null;
        }

        if ($this->translator->has($name)) {
            $translatedName = $this->translator->get($name);

            if (is_string($translatedName)) {
                return $translatedName;
            }
        }

        return ucfirst(str_replace('_', ' ', $name));
    }
public function formatLabel ( $ name ) { if ( ! $ name ) { return null ; } if ( $ this -> translator -> has ( $ name ) ) { $ translatedName = $ this -> translator -> get ( $ name ) ; if ( is_string ( $ translatedName ) ) { return $ translatedName ; } } return ucfirst ( str_replace ( '_' , ' ' , $ name ) ) ; }
Format the label to the proper format.

@param $name
@return string
Format the label to the proper format .