Closed stefro closed 7 years ago
We discussed it, and we rather like the ability to pass a regex to the existing routeis directive. Could you build that?
In my opinion writing a regex as argument in the routeis is not that expressive. Since it would read like "Route is starts with" which doesn't make much sense when quick reviewing the code. Of course, I value your opinion of you won't merge this PR. It's still a great package :-)
@stefro something like @routeis('blog.*') looks pretty readable (also when quick reviewing) to me.
@teuunn yes, that looks great! I didn’t get this from @gizburdt answer. I thought he wanted a regex as an argument. A wildcard would be nice!
I meant the same. A wildcard as parameter can be passed through a preg_match in directives.php, so all regexes are directly supported, not only a wildcard. Can you update this PR? Thanks for the help! :)
fnmatch makes it easy to allow for wildcards. I've just pushed an update.
Thanks :)
Checks if the current route name starts with the provided string.