2016-06-12 11 views

答えて

1

これを行う最善の方法は、結合したデータベースから取得した値でユーザーを手動で認証することです。

私が育ってきた最速のソリューションは、このようなものです:

//join the tables and name it as $joined_table_values 
if(isset($joined_table_values)){ 
    if($joined_table_values->field == 'theValueYouNeed'){ 
     //Then authenticate manually with the values in default users table 
     if (Auth::attempt(['email' => $email, 'password' => $password])) { 
     // Authentication passed... 
     return redirect()->intended('dashboard'); 
     } 
    } 
} 

リソース:https://laravel.com/docs/5.2/authentication#authenticating-users

関連する問題