tp6中间使用,控制器继承

浏览:1503 发布日期:2020/10/27 分类:ThinkPHP6专区
使用中间件验证登录,控制器继承不了,只能继承 baseController控制器
在Controller目录和app目录都不行,访问出错
#0 [0]Error in Index.php line 6
Class 'app\AdminbaseController' not found
<?php
namespace app\controller;

use app\AdminbaseController;
use think\facade\View;
class Index extends AdminbaseController
{

public function index()
{
return view();
}

public function hello()
{
return 'hello,';
}

}
最佳答案
评论( 相关
后面还有条评论,点击查看>>