crysalead / resource
Resource Routing & Dispatching Framework
Installs: 8 120
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- crysalead/chaos-orm: dev-master
- crysalead/inflector: ^2.0
- crysalead/net: dev-master
- crysalead/router: ~3.1
- crysalead/set: ~2.0
- psr/http-message: ~1.0
Requires (Dev)
- crysalead/chaos-database: dev-master
- kahlan/kahlan: ~5.0
This package is auto-updated.
Last update: 2024-12-13 20:29:20 UTC
README
Resource dispatching strategy for router.
Installation
composer require crysalead/resource
API
Setting up the strategy
Example of routes definition:
use Lead\Router\Router; use Lead\Router\Resource\ResourceStrategy; $router = new Router(); $router->strategy('resource', new ResourceStrategy()); $router->resource('MyResource'); // Matching any following URLs // /my_resource // /my_resource/:<action> // /my_resource/<id>/:<action> // /my_relation/<id>/my_resource // /my_relation/<id>/my_resource/:<action>