Skip to content
导航目录

注解路由

注解路由

tp6路由文档:https://www.kancloud.cn/manual/thinkphp6_0/1037502

1. 使用方式

  • 使用group进行路由分组,使用Route设置路由规则
ts
use think\annotation\route\Group;
use think\annotation\Route;

/**
 * 个人中心
 * Class User
 * @package app\api\controller
 * @author  2066362155@qq.com
 * @Group("user")
 */
class User extends Center
{
    /**
     * @Route("index", method="GET")
     */
    public function index()
    {
    }

    
}

欢迎使用HardAdmin