letrunghieu / active

The helper class for Laravel applications to get active class base on current route
https://www.hieule.info/tag/laravel-active/
MIT License
414 stars 82 forks source link

建议增加 if_query_pattern #33

Closed hao-li closed 7 years ago

hao-li commented 8 years ago

[Proposal] Add if_query_pattern function

Some libraries use a complex combination of parameter's values.

For example: RequestCriteria of andersao/l5-repository

http://prettus.local/users?filter=id;name

The values (id and name as well as others) of filter could be dynamic combination. Can not easily be matched by if_query.

letrunghieu commented 7 years ago

For too complicated patterns, I think users should test the conditions by themselves and pass the result into the active_class helper function.