feat(auth): implement authentication endpoints with registration and login functionality
This commit is contained in:
35
app/Http/Requests/Auth/LoginRequest.php
Normal file
35
app/Http/Requests/Auth/LoginRequest.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Auth;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class LoginRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'login' => ['required', 'string'],
|
||||
'password' => ['required', 'string'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'login.required' => 'ایمیل یا نام کاربری الزامی است.',
|
||||
'password.required' => 'رمز عبور الزامی است.',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user