-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
controller namespaces #80
Labels
Comments
Route::group("api", function($route) {
$route->post('/users/:id/archive', 'users#archive');
$route->resource('users');
$route->get('/users/:id/orders', 'users#orders');
}); or Route::group("api", function($route) {
Route::post('/users/:id/archive', 'users#archive');
Route::resource('users');
Route::get('/users/:id/orders', 'users#orders');
}); Should be an equivalent of: Route::post('/api/users/:id/archive', 'api/users#archive');
Route::resource('api/users');
Route::get('/api/users/:id/orders', 'api/users#orders'); |
piotrooo
added a commit
that referenced
this issue
Apr 22, 2014
piotrooo
added a commit
that referenced
this issue
Apr 22, 2014
piotrooo
added a commit
that referenced
this issue
Apr 22, 2014
My implementation works as follows: Route::group("api", function() {
GroupedRoute::post('/users/:id/archive', 'users#archive');
GroupedRoute::resource('users');
GroupedRoute::get('/users/:id/orders', 'users#orders');
}); Please, review the code. If you prefer what you proposed, it should be fairly easy to change. If you accept, then we should add issue on writing documentation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple syntax (We can add more convenient syntax later):
Resulting file structure:
application
/controller/api/UsersController.php
/view/api/Users/show.phtml
/view/api/Users/*.phtml
The text was updated successfully, but these errors were encountered: