src/Database/Titles/Title.php
protected function humanize($value)
    {
        // Older versions of Laravel's inflector strip out spaces
        // in the original string, so we'll first swap out all
        // spaces with underscores, then convert them back.
        $value = str_replace(' ', '_', $value);

        // First we'll convert the string to snake case. Then we'll
        // convert all dashes and underscores to spaces. Finally,
        // we'll add a space before a pound (Laravel doesn't).
        $value = Str::snake($value);

        $value = preg_replace('~(?:-|_)+~', ' ', $value);

        $value = preg_replace('~([^ ])(?:#)+~', '$1 #', $value);

        return ucfirst($value);
    }
protected function humanize($value)
    {
        // Older versions of Laravel's inflector strip out spaces
        // in the original string, so we'll first swap out all
        // spaces with underscores, then convert them back.
        $value = str_replace(' ', '_', $value);

        // First we'll convert the string to snake case. Then we'll
        // convert all dashes and underscores to spaces. Finally,
        // we'll add a space before a pound (Laravel doesn't).
        $value = Str::snake($value);

        $value = preg_replace('~(?:-|_)+~', ' ', $value);

        $value = preg_replace('~([^ ])(?:#)+~', '$1 #', $value);

        return ucfirst($value);
    }
protected function humanize ( $ value ) { // Older versions of Laravel's inflector strip out spaces // in the original string, so we'll first swap out all // spaces with underscores, then convert them back. $ value = str_replace ( ' ' , '_' , $ value ) ; // First we'll convert the string to snake case. Then we'll // convert all dashes and underscores to spaces. Finally, // we'll add a space before a pound (Laravel doesn't). $ value = Str :: snake ( $ value ) ; $ value = preg_replace ( '~(?:-|_)+~' , ' ' , $ value ) ; $ value = preg_replace ( '~([^ ])(?:#)+~' , '$1 #' , $ value ) ; return ucfirst ( $ value ) ; }
Convert the given string into a human-readable format.

@param  string  $value
@return string
Convert the given string into a human - readable format .