nextras / static-router
Simple static router for Nette Framework
Installs: 124 184
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-12-21 00:11:30 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', ]);