TypeError: Argument 1 passed to Tymon/JWTAuth/JWT::fromUser () must be an instance of Tymon/JWTAuth/Contracts/JWTSubject, instance of App/Models/User given?
执行 教程里面的,
$user = App\Models\User::first();
Auth::guard('api')->fromUser($user);
出现 TypeError: Argument 1 passed to Tymon/JWTAuth/JWT::fromUser() must be an instance of Tymon/JWTAuth/Contracts/JWTSubject, instance of App/Models/User given
推荐文章: