家政小程序
Ви не можете вибрати більше 25 тем Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. use Illuminate\Http\Request;
  3. /*
  4. |--------------------------------------------------------------------------
  5. | API Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register API routes for your application. These
  9. | routes are loaded by the RouteServiceProvider within a group which
  10. | is assigned the "api" middleware group. Enjoy building your API!
  11. |
  12. */
  13. Route::middleware('auth:api')->get('/user', function (Request $request) {
  14. return $request->user();
  15. });
  16. Route::post('/login', 'CommonController@login');
  17. Route::get('/classify', 'ClassifyController@list');
  18. Route::get('/classify/parent', 'ClassifyController@parent');
  19. Route::get('/campaigns', 'CampaignController@list');
  20. Route::get('/products', 'ProductController@list');
  21. Route::get('/house_clean_orders', 'HouseCleanOrderController@list');
  22. Route::get('/house_appliance_clean_orders', 'HouseApplianceCleanOrderController@list');
  23. Route::get('/housekeeper_orders', 'HousekeeperOrderController@list');
  24. Route::get('/option_orders', 'OptionOrderController@list');
  25. Route::get('/maternity_matron_orders', 'MaternityMatronOrderController@list');
  26. Route::get('/product_orders', 'ProductOrderController@list');
  27. Route::get('/server_infos', 'ClassifyController@home');
  28. Route::get('/classifies', 'ClassifyController@list');
  29. Route::get('/company_info', 'HomePageController@introduce');
  30. Route::post('/campaign/store', 'CampaignController@store');
  31. Route::post('/product/store', 'ProductController@store');
  32. Route::get('/product/home', 'ProductController@home');
  33. Route::post('/payments/wechat-notify', 'PaymentController@notify');
  34. Route::get('/classify/{classify_id}/options', 'OptionController@option_keys');
  35. Route::get('/option/key/{id}', 'OptionController@option_key');
  36. Route::get('/option/value/{id}', 'OptionController@option_value');
  37. Route::get('/server_info/{id}', 'ClassifyController@server_content');
  38. Route::get('/classify/{id}', 'ClassifyController@get');
  39. Route::post('/upload', 'CommonController@upload');
  40. Route::post('/server/store', 'ServerInfoController@store');
  41. Route::get('/{order_type}/{order_id}/comments', 'CommonController@comments');
  42. Route::post('/{order_type}/status', 'CommonController@status');
  43. Route::get('/{order_type}/{id}', 'CommonController@get')->where('id', '[0-9]+');
  44. Route::delete('/product_order/{id}', 'ProductOrderController@delete')->where('id', '[0-9]+');
  45. Route::delete('/{order_type}/{id}', 'CommonController@delete')->where('id', '[0-9]+');
  46. Route::middleware(['token'])->group(function () {
  47. Route::get('/my/orders', 'CommonController@orders');
  48. Route::get('/shopcars', 'ShopcarController@list');
  49. Route::post('/shopcar/add', 'ShopcarController@add');
  50. Route::post('/shopcar/pstore', 'ShopcarController@pstore');
  51. Route::delete('/shopcar/{id}', 'ShopcarController@delete')->where('id', '[0-9]+');
  52. Route::delete('/shopcar/pdelete', 'ShopcarController@pdelete');
  53. Route::post('/shopcar/amount', 'ShopcarController@amount');
  54. Route::post('/{order_type}/{order_id}/comment', 'CommonController@addComment');
  55. Route::post('/house_clean_order/store', 'HouseCleanOrderController@store');
  56. Route::post('/house_appliance_clean_order/store', 'HouseApplianceCleanOrderController@store');
  57. Route::post('/housekeeper_order/store', 'HousekeeperOrderController@store');
  58. Route::post('/option_order/store', 'OptionOrderController@store');
  59. Route::post('/maternity_matron_order/store', 'MaternityMatronOrderController@store');
  60. Route::post('/product_order/store', 'ProductOrderController@store');
  61. Route::post('/server_info/store', 'ServerInfoController@store');
  62. Route::post('/company_info/store', 'CompanyInfoController@store');
  63. Route::post('/payments/pay', 'PaymentController@buildOrder');
  64. Route::post('/reward', 'RewardController@reward');
  65. });