//利用构造函数判断登录
public function __construct(){
//判断是否已经登录
if (!session('?squail') && !Cookie::has('squail')){
return header(strtolower("location: /admin/login"));
exit;
}
}
//后台首页
public function index(){
return $this->fetch('\index');
}
报错:
Call to a member function fetch() on null