public function urlParserMultiple($str, $rule, $html = null)
    {
        $explode = explode(';', $str);
        $url = collect($explode)->map(function ($item) use ($rule) {
            return $this->urlParser($item, $rule);
        });

        if (is_null($html)) {
            $url = $url->all();
        } else {
            $url = $url->implode($html);
        }

        return $url;
    }
public function urlParserMultiple($str, $rule, $html = null)
    {
        $explode = explode(';', $str);
        $url = collect($explode)->map(function ($item) use ($rule) {
            return $this->urlParser($item, $rule);
        });

        if (is_null($html)) {
            $url = $url->all();
        } else {
            $url = $url->implode($html);
        }

        return $url;
    }
public function urlParserMultiple ( $ str , $ rule , $ html = null ) { $ explode = explode ( ';' , $ str ) ; $ url = collect ( $ explode ) -> map ( function ( $ item ) use ( $ rule ) { return $ this -> urlParser ( $ item , $ rule ) ; } ) ; if ( is_null ( $ html ) ) { $ url = $ url -> all ( ) ; } else { $ url = $ url -> implode ( $ html ) ; } return $ url ; }
Parse multiple URLs from string separated by commas or semicolons
@param  string  $str
@param  string  $rule substitution rule, for example: <a href="[url]">[caption]</a>
@param  string  $html if null returns array if filled with an html tag, returns a string separated by the tag
@return mixed
Parse multiple URLs from string separated by commas or semicolons