darktec/router
最新稳定版本:1.0.0-alpha.1
Composer 安装命令:
composer require darktec/router
包简介
Routing package for PHP 8
README 文档
README
Install
To install router as a Composer package run:
$ composer require darktec/router
Usage
First initialize the router
Router::init();
Then create your mappings using METHOD, ROUTE, ACTION where ACTION is a function
Router::map('GET', '/', '\package\controller@function'); // OR Router::map('GET', '/', function() { echo 1; });
Finally match the request method and URI
Router::match($method, $uri);
If a match is found then the function defined is invoked.
Change log
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-21