$userInfo = UserInfo::where('phone', $request->get('phone', ''))->firstOrFail();
$user = User::findOrFail($userInfo->user_id);
if(\Hash::check($request->get('password', ''), $user->password))
{
auth()->login($user, true);
}
public function login()
{
//находим номер
$phone = Phones::where('phone', $phone)->with('user')->firstOrFail();
//BelongTo
$user = $phone->user;
//проверяем пароль
if (!Hash::check($password, $user->password)) return false;
//авторизуем
auth()->login($user, true);
//перенаправляем
return redirect()->route('home')->with('message', 'Вы успешно вошли');
}