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');
파일 보기
프로젝트 열기: letsdrink/ouzo
1 사용 예제들
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$isDebug | |||
$methods | |||
$validate |
메소드 | 설명 | |
---|---|---|
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 ) |
메소드 | 설명 | |
---|---|---|
addResourceRoute ( $controller, $method, $uriSuffix, $action ) | ||
addRoute ( $method, $uri, $action, $requireAction = true, $options = [], $isResource = false ) | ||
createRouteAction ( $controller, $action ) | ||
createRouteUri ( $action, $suffix = '' ) | ||
existRouteRule ( $methods, $uri ) |