App\Foundation\Enums\Enum::allAsRegex PHP Method

allAsRegex() public static method

public static allAsRegex ( ) : string
return string
    public static function allAsRegex() : string
    {
        return collect(static::values())->map(function ($value) {
            return "({$value})";
        })->implode('|');
    }