Add request validation to login store endpoint
This commit is contained in:
parent
d5fa662a54
commit
fd2f2318e3
|
@ -17,6 +17,11 @@ class LoginController extends Controller
|
|||
|
||||
public function store()
|
||||
{
|
||||
Request::validate([
|
||||
'email' => ['required', 'string', 'email'],
|
||||
'password' => ['required', 'string'],
|
||||
]);
|
||||
|
||||
if (Auth::attempt(Request::only('email', 'password'), Request::boolean('remember'))) {
|
||||
Session::regenerate();
|
||||
|
||||
|
|
Loading…
Reference in New Issue