瀏覽代碼

feat: 新增路由模版,配置模版

runphp 6 月之前
父節點
當前提交
efa6d6bf63
共有 3 個文件被更改,包括 23 次插入0 次删除
  1. 5 0
      templates/config.php.tpl.php
  2. 9 0
      templates/route/admin.php.tpl.php
  3. 9 0
      templates/route/api.php.tpl.php

+ 5 - 0
templates/config.php.tpl.php

@@ -0,0 +1,5 @@
+<?= "<?php\n" ?>
+declare(strict_types=1);
+
+return [
+];

+ 9 - 0
templates/route/admin.php.tpl.php

@@ -0,0 +1,9 @@
+<?= "<?php\n" ?>
+declare(strict_types=1);
+
+
+use think\facade\Route;
+
+// Admin路由
+// 路由前缀: /admin/<?= $id ?>
+

+ 9 - 0
templates/route/api.php.tpl.php

@@ -0,0 +1,9 @@
+<?= "<?php\n" ?>
+declare(strict_types=1);
+
+
+use think\facade\Route;
+
+// API路由
+// 路由前缀: /api/<?= $id ?>
+