修改request
This commit is contained in:
@@ -3,12 +3,18 @@ namespace app;
|
||||
|
||||
// 应用请求对象类
|
||||
|
||||
use catchAdmin\user\Auth;
|
||||
use catcher\CatchAuth;
|
||||
|
||||
class Request extends \think\Request
|
||||
{
|
||||
protected $auth;
|
||||
|
||||
public function user()
|
||||
{
|
||||
return Auth::user();
|
||||
if (!$this->auth) {
|
||||
$this->auth = new CatchAuth;
|
||||
}
|
||||
|
||||
return $this->auth->user();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user