api.php 571 B

123456789101112131415161718192021
  1. <?php
  2. declare(strict_types=1);
  3. use think\facade\Route;
  4. use SixShop\Lakala\Controller\Api\{
  5. IndexController,
  6. ProfitShareOrderController,
  7. ProfitShareReceiverController
  8. };
  9. // API路由
  10. // 路由前缀: /api/lakala
  11. //
  12. // 如果需要登录请添加认证中间件auth
  13. // ->middleware(['auth'])
  14. Route::resource('profit_share_order', ProfitShareOrderController::class)
  15. ->middleware(['auth']);
  16. Route::resource('profit_share_receiver', ProfitShareReceiverController::class)
  17. ->middleware(['auth']);
  18. Route::post('notify', [IndexController::class, 'notify']);