企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
>[danger] redirect 重定向助手函数 ``` public function index() { return redirect('index/login'); } ``` >[danger] 特别注意: 以上写法无法在基础控制器的初始化方法中跳转 该重定向助手函数在`BaseController.php` 的初始化方法`initialize()`中无法跳转 解决方案 ``` throw new \think\exception\HttpResponseException(redirect('login')); ```