add password login

This commit is contained in:
Yisroel Baum 2026-07-31 11:38:05 +03:00
parent 93f5f022e4
commit ebfe147ca4
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
12 changed files with 192 additions and 6 deletions

View file

@ -0,0 +1,40 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class LoginRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, array<int, string>>
*/
public function rules(): array
{
return [
'email' => [
'required',
'string',
'email',
'max:255',
],
'password' => [
'required',
'string',
],
];
}
protected function prepareForValidation(): void
{
$email = $this->input('email');
if (is_string($email)) {
$this->merge(['email' => trim($email)]);
}
}
}