catchAdmin/app/Request.php

27 lines
347 B
PHP
Raw Normal View History

2019-12-02 23:04:43 +08:00
<?php
namespace app;
// 应用请求对象类
2020-01-08 22:43:40 +08:00
use catcher\CatchAuth;
2019-12-12 18:52:11 +08:00
2019-12-02 23:04:43 +08:00
class Request extends \think\Request
{
2020-01-08 22:43:40 +08:00
protected $auth;
2020-01-17 11:30:39 +08:00
/**
* login user
*
* @time 2020年01月09日
* @return mixed
*/
public function user()
{
if (!$this->auth) {
$this->auth = new CatchAuth;
2019-12-12 18:52:11 +08:00
}
2020-01-17 11:30:39 +08:00
return $this->auth->user();
}
2019-12-02 23:04:43 +08:00
}