我使用Socialite在我的平臺上登錄社交網絡。 數據插入到我的數據庫,但我沒有登錄?Laravel 5.4:社交名不記錄
這是我的控制器:
$socialProvider = SocialProvider::where('provider_id',$socialUser->getId())->first();
$user = $socialProvider->user;
dd($user);
auth()->login($user);
的DD($用戶)給我:
User {#548 ▼
#table: "users"
#guarded: array:1 [▶]
#fillable: array:24 [▶]
#hidden: array:2 [▶]
#dates: array:1 [▶]
#persistableKey: "user_id"
#persistableRelationship: "persistences"
#loginNames: array:1 [▶]
#connection: null
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#attributes: array:26 [▶]
#original: array:26 [▶]
#casts: []
#dateFormat: null
#appends: []
#events: []
#observables: []
#relations: []
#touches: []
+timestamps: true
#visible: []
#permissionsInstance: null
#rememberTokenName: "remember_token"
#forceDeleting: false
}
我改變登錄電話:Auth :: login($ user,true);但仍然無法正常工作。
已經嘗試過。 – Kaherdin