feat(auth): implement authentication endpoints with registration and login functionality

This commit is contained in:
2026-06-05 19:19:03 +03:30
parent 802326336a
commit 0ddd54dc66
15 changed files with 961 additions and 3 deletions

View 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' => 'رمز عبور الزامی است.',
];
}
}