larvael5.5 api 登录
$token=Auth::guard(‘api’)->attempt([‘name’=>$request->name,’password’=>$request->password]);使用这个方法登录在当前方法可以使用 Auth::guard(‘api’)->user()
在别的方法里面使用获取为null 求解
推荐文章: