Route::get('/agents/index', 'agents#index'); will match: GET /agents/index
Route::post('/agents/save', 'agents#save'); will match: POST /agents/save
Route::resource('agents'); will mapping RESTs methods (index, fresh, edit, show, create, update, destroy)
Route::any('/agents/show_numbers', 'agents#show_numbers'); will match: POST or GET /agents/show_numbers
Route::allowAll('/agents', 'agents'); will mapping any methods to all actions in controller
To show all routes or routes per controller:
Route::getRoutes();
Route::getRoutesForController('agents');
Mostrar archivo
Open project: letsdrink/ouzo
Class Usage Examples
Property | Type | Description | |
---|---|---|---|
$isDebug | |||
$methods | |||
$validate |
Method | Description | |
---|---|---|
allowAll ( $uri, $controller, $options = [] ) | ||
any ( $uri, $action, array $options = [] ) | ||
clear ( ) | ||
delete ( $uri, $action, array $options = [] ) | ||
get ( $uri, $action, array $options = [] ) | ||
getRoutes ( ) : |
||
getRoutesForController ( $controller ) | ||
group ( $name, $routeFunction ) | ||
post ( $uri, $action, array $options = [] ) | ||
put ( $uri, $action, array $options = [] ) | ||
resource ( $controller ) |
Method | Description | |
---|---|---|
addResourceRoute ( $controller, $method, $uriSuffix, $action ) | ||
addRoute ( $method, $uri, $action, $requireAction = true, $options = [], $isResource = false ) | ||
createRouteAction ( $controller, $action ) | ||
createRouteUri ( $action, $suffix = '' ) | ||
existRouteRule ( $methods, $uri ) |