【发布时间】:2016-03-24 21:28:03
【问题描述】:
使用 AltoRouter,我需要将任何以 /customer 开头的请求传递给某个 path/to/CustomerController.php 文件,然后在那里进行我所有的特定匹配。
在CustomerController.php 我会匹配我所有的方法,即:
public static function Transfer(){... this will be invoked from /customer/transfer...
public static function Register(){... this will be invoked from /customer/register...
在 Laravel 中,您可以这样做:
Route::controller("customer", 'CustomerController');
我需要完全相同的东西,但使用 AltoRouter。我找不到任何方法来做到这一点
(我只是不想让一个路由文件处理我网站上的所有控制器方法,而是让每个控制器处理所有特定路由的方法)
【问题讨论】:
标签: php altorouter