<?php
namespace app\index\controller;
use think\Controller;
class Index extends controller
{
public function index()
{
$this->redirect('/admin/login/');
}
}
注意:要有 use think\Controller;
class Index extends controller
官方文档:https://www.kancloud.cn/manual/thinkphp5/118051