garygreen / pretty-routes

Pretty routes for Laravel
655 stars 77 forks source link

The function "preg_match" for the "str_is" helper has been replaced #41

Closed andrey-helldar closed 6 years ago

andrey-helldar commented 6 years ago

Replaced the use of the preg_match method to the str_is helper.

garygreen commented 6 years ago

Why? Seems more restrictive for no real gain in functionality?

andrey-helldar commented 6 years ago

Since the package runs inside the Laravel framework, I would use its methods. But this is only my personal opinion.

garygreen commented 6 years ago

Under the hood str_is is probably using regex anyway, this doesn't really add much and just restricts people who want a lot of control over what route patterns are ignored.

andrey-helldar commented 6 years ago

The main difference with the user is setting up the excluded routes. Either they look like #^_debugbar#, or as routes*. It's all about perception.