public function setSingular($title = [])
    {
        if (! empty($title) && isset($title[0])) {
            $this->singular = $title[0];
        } else {
            $name = str_replace('_', ' ', $this->getSlug());

            $this->singular = Str::singular(Str::title($name));
        }

        return $this;
    }
public function setSingular($title = [])
    {
        if (! empty($title) && isset($title[0])) {
            $this->singular = $title[0];
        } else {
            $name = str_replace('_', ' ', $this->getSlug());

            $this->singular = Str::singular(Str::title($name));
        }

        return $this;
    }
public function setSingular ( $ title = [ ] ) { if ( ! empty ( $ title ) && isset ( $ title [ 0 ] ) ) { $ this -> singular = $ title [ 0 ] ; } else { $ name = str_replace ( '_' , ' ' , $ this -> getSlug ( ) ) ; $ this -> singular = Str :: singular ( Str :: title ( $ name ) ) ; } return $ this ; }
Sets the value of singular.

@param mixed $singular the singular

@return self
Sets the value of singular .