src/Utilities/Helper.php
public static function wildcardString($str, $wildcard, $lowercase = true)
    {
        $wild  = $wildcard;
        $chars = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY);

        if (count($chars) > 0) {
            foreach ($chars as $char) {
                $wild .= $char . $wildcard;
            }
        }

        if ($lowercase) {
            $wild = Str::lower($wild);
        }

        return $wild;
    }
public static function wildcardString($str, $wildcard, $lowercase = true)
    {
        $wild  = $wildcard;
        $chars = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY);

        if (count($chars) > 0) {
            foreach ($chars as $char) {
                $wild .= $char . $wildcard;
            }
        }

        if ($lowercase) {
            $wild = Str::lower($wild);
        }

        return $wild;
    }
public static function wildcardString ( $ str , $ wildcard , $ lowercase = true ) { $ wild = $ wildcard ; $ chars = preg_split ( '//u' , $ str , - 1 , PREG_SPLIT_NO_EMPTY ) ; if ( count ( $ chars ) > 0 ) { foreach ( $ chars as $ char ) { $ wild .= $ char . $ wildcard ; } } if ( $ lowercase ) { $ wild = Str :: lower ( $ wild ) ; } return $ wild ; }
Adds wildcards to the given string.

@param string $str
@param string $wildcard
@param bool   $lowercase
@return string
Adds wildcards to the given string .