TP的restful路由分组

TP的restful路由分组_第1张图片

'\d+']);

Route::get('api/:version/product/by_category/paginate', 'api/:version.Product/getByCategory');
Route::post('api/:version/product', 'api/:version.Product/createOne');
Route::delete('api/:version/product/:id', 'api/:version.Product/deleteOne');

//category
Route::get('api/:version/category/all', 'api/:version.Category/getAll');

//token
Route::post('api/:version/token/user', 'api/:version.Token/getToken');

//地址
Route::get('api/:version/address', 'api/:version.Address/getUserAddress');
Route::post('api/:version/address', 'api/:version.Address/createOrUpdateAddress');

//订单
Route::post('api/:version/order', 'api/:version.Order/placeOrder');
Route::put('api/:version/order/delivery', 'api/:version.Order/delivery');
Route::get('api/:version/order/:id', 'api/:version.Order/getDetail',[], ['id'=>'\d+']);
Route::get('api/:version/order/by_user', 'api/:version.Order/getSummary');

//支付
Route::post('api/:version/pay/pre_order', 'api/:version.Pay/getPreOrder');
Route::post('api/:version/pay/notify', 'api/:version.Pay/receiveNotify');
Route::post('api/:version/pay/re_notify', 'api/:version.Pay/redirectNotify');
Route::post('api/:version/pay/concurrency', 'api/:version.Pay/notifyConcurrency');

 

你可能感兴趣的:(PHP,TP)