fix:change managing tours

This commit is contained in:
2026-08-22 11:15:20 +03:30
parent 11dd446ef4
commit 4599b5b52c
6 changed files with 205 additions and 13 deletions
@@ -0,0 +1,62 @@
<?php
namespace App\Http\Requests\Admin;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class UserUpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'first_name' => [
'required',
'persian_alpha',
'min:2',
'max:100',
],
'last_name' => [
'required',
'persian_alpha',
'min:3',
'max:100',
],
'mobile' => [
'required',
'string',
'ir_mobile:zero',
'unique:users,mobile,' . $this->route('user')->id ],
'password' => [
'nullable',
'string',
'min:6',
'max:255',
],
'email' => [
'required',
'max:150',
'email',
'unique:users,email,' . $this->route('user')->id
]
];
}
}