nextras / static-router
Simple static router for Nette Framework
Installs: 122 865
Dependents: 1
Suggesters: 0
Security: 0
Stars: 25
Watchers: 9
Forks: 2
Open Issues: 0
Requires
- php: >=7.1
- nette/http: ~3.0
- nette/routing: ~3.0
Requires (Dev)
- nette/tester: ~2.0
- phpstan/phpstan: ^0.12
This package is auto-updated.
Last update: 2024-10-20 23:42:41 UTC
README
Installation
Add to your composer.json:
"require": {
"nextras/static-router": "~2.0"
}
Example
use Nextras\Routing\StaticRouter; $router = new StaticRouter(['Homepage:default' => 'index.php'], StaticRouter::ONE_WAY); $router = new StaticRouter([ 'Homepage:default' => '', 'Auth:signIn' => 'sign-in', 'Auth:signOut' => 'sign-out', 'Auth:signUp' => 'sign-up', ]);