add auth api

This commit is contained in:
2024-09-02 23:29:48 +05:00
parent dac9b6fab9
commit 0630647272
7 changed files with 209 additions and 4 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Modules\ApiAuth\Requests;
use Illuminate\Foundation\Http\FormRequest;
class AuthRegisterRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
*/
public function rules(): array
{
return [
/**
* Phone number to authenticate
* @var int
* @example 65707012
*/
'phone_number' => ['required', 'integer', 'between:61000000,71999999', 'unique:users,phone_number'],
/**
* User's name
* @var string
* @example Mahmyt Allaberdiyev
*/
'name' => ['required', 'string', 'max:255'],
];
}
}