api.php.tpl.php 263 B

12345678910111213
  1. <?= "<?php\n" ?>
  2. declare(strict_types=1);
  3. use think\facade\Route;
  4. // API路由
  5. // 路由前缀: /api/<?= $id ?>
  6. //
  7. // 如果需要登录请添加认证中间件auth
  8. // ->middleware(['auth'])
  9. Route::resource('<?= $tableName ?>', <?= $controllerName ?>::class);