测试
This commit is contained in:
@@ -2,15 +2,19 @@
|
||||
|
||||
namespace App\Services\Base;
|
||||
|
||||
use App\Models\UserModel;
|
||||
|
||||
class BaseService
|
||||
{
|
||||
protected $userId;
|
||||
protected $userInfo;
|
||||
protected static $instance;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$token = request()->header('token');
|
||||
$this->userId = $token;
|
||||
$this->userInfo = UserModel::where('id', $token)->first();
|
||||
}
|
||||
|
||||
// 单例
|
||||
|
||||
Reference in New Issue
Block a user