Add a new route
public addRoute ( String $method, String $route, Callable $callback ) | ||
$method | String | type of route |
$route | String | uri to catch |
$callback | Callable |
/** * Create a new route for the group * @param String $method * @param String $route * @param Callable $callback */ public function addRoute($method, $route, $callback) { $route = $this->router->addRoute(strtoupper($method), $this->prefix . '/' . $route, $callback); $route->onAny(function ($event, $arguments) { $this->emit($event, $arguments); }); $this->routes[] = $route; return $route; }