Installation
Install Router with Composer.
shell
composer require raxos/routerRequirements
- PHP 8.5 or newer.
- The
ctypeextension. - The
fileinfoextension. - The
jsonextension. - The
simplexmlextension.
Raxos dependencies
Router builds on a small set of other Raxos packages, which Composer installs automatically:
- container: resolves controller and middleware dependencies that are not path, query or header values.
- foundation: provides the base utilities and the
StringParsableInterfaceused to type path parameters. - http: provides the
HttpRequestandHttpResponseobjects the router consumes and returns.
The database package is an optional dependency. It is only needed to use the #[MapModel] and #[MapModelRelation] attributes, which resolve ORM models directly from path parameters.
Return to the Router introduction.