src/Parser/MentionParser.php
protected function replace(array $match): string
    {
        $character = $this->getOption('character');
        $mention = Str::title(str_replace($character, '', trim($match[0])));

        $route = config('mentions.pools.' . $this->getOption('pool') . '.route');

        $link = $route . $mention;

        return " [{$character}{$mention}]($link)";
    }
protected function replace(array $match): string
    {
        $character = $this->getOption('character');
        $mention = Str::title(str_replace($character, '', trim($match[0])));

        $route = config('mentions.pools.' . $this->getOption('pool') . '.route');

        $link = $route . $mention;

        return " [{$character}{$mention}]($link)";
    }
protected function replace ( array $ match ) : string { $ character = $ this -> getOption ( 'character' ) ; $ mention = Str :: title ( str_replace ( $ character , '' , trim ( $ match [ 0 ] ) ) ) ; $ route = config ( 'mentions.pools.' . $ this -> getOption ( 'pool' ) . '.route' ) ; $ link = $ route . $ mention ; return " [{$character}{$mention}]($link)" ; }
Replace the mention with a markdown link.

@param array $match The mention to replace.

@return string
Replace the mention with a markdown link .