if (session()->get('auth')=='on'){
return redirect()->to('/chatroom');
}
$credentials = $request->validate([
'email' => ['required', 'email'],
'password' => ['required','max:80'],
]);
if (Auth::attempt($credentials,($request->rememberMe?true:false))) {
// session()->put('auth',"on");
$request->session()->regenerate();
return redirect()->to('/chatroom');
}
return redirect()->to('/signup');
}
Чета страшна
Обсуждают сегодня