This commit is contained in:
2025-06-26 09:56:14 +08:00
parent 274c798ac8
commit 3ac275bd9b
7 changed files with 115 additions and 19 deletions

View File

@@ -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();
}
// 单例