Nested RESTFul 怎么设计?
新手 RESTFul 不太明白
http://v4.golaravel.com/docs/4 ... lersX8X这里是2层
这里是多一个控制器 PhotoCommentController
多层嵌套怎么实现?
难道要这样?
....
????? .....
http://v4.golaravel.com/docs/4 ... lersX8X这里是2层
Route::resource('photos.comments', 'PhotoCommentController');
photos/{photoResource}/comments/{commentResource}
这里是多一个控制器 PhotoCommentController
多层嵌套怎么实现?
url:
POST http://api.xxx.com/organization/1/user/2/group/3/resource
route:
Route::resource( 'organization.user.group.resource', 'App\Modules\Admin\Controllers\ResourceController' );
难道要这样?
Route::resource( 'organization.user.group.resource', 'App\Modules\Admin\Controllers\OrganizationUserGroupResourceController' );
....
GET http://api.xxx.com/organization/1/user/2/group/3/resource?Pattern=xxxx&validate=xxxx
????? .....
1 个回复
FiveSay - 成武
赞同来自: