carlosocarvalho/router
最新稳定版本:1.0.0
Composer 安装命令:
composer require carlosocarvalho/router
包简介
PHP router
README 文档
README
Simple Routers PHP
get('/',function(){ echo 'home page'; }); $router->get('/posts/:id-:slug',function($id, $slug) use ($router){ echo $router->url('Blog#show',['id'=>1,'slug'=>'slugsd-idads']); },'posts.show')->with('id','[0-9]+')->with('slug','([a-z\-0-9]+)'); $router->get('/posts/:id','Blog#show'); $router->post('/posts/:id',function($id){ print_r($_POST); }); $router->run(); ### Use Custom Controllers $router->get('/posts','Blog#show'); Create new Controller BlogController.phpExamples
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL
- 更新时间: 2015-05-26