folded-php / folded-php/routing
To be able to check if multiples routes match the current URL
Open
enhancement
- Dominant language
- PHP
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Description
I currently have to use multiple times `currentRouteIs()` for highlighting a dropdown menu.
## Expected behavior
To be able to specify multiples routes.
```php
use function Folded\currentRouteIs;
if (currentRouteIs(["home.index", "popular.index"])) {
// This is either the home page or the popular posts page
} else {
// This is another page
}
```
## Alternatives solutions
To chain calls:
```php
if (currentRouteIs("home.index") || currentRouteIs("popular.index")) {
// ...
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.