Implement settings page: profile update and password change

This commit is contained in:
2026-08-17 18:06:48 +03:30
parent 2c3495820a
commit a09e8e4eb1
6 changed files with 261 additions and 4 deletions
+57
View File
@@ -0,0 +1,57 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class ProfilePostRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'first_name' => [
'required',
'string',
'min:3',
'max:150',
'persian_alpha',
],
'last_name' => [
'required',
'string',
'min:3',
'max:150',
'persian_alpha',
],
'email'=> [
'required',
'email',
Rule::unique('users', 'email')->ignore($this->user()->id)],
'mobile'=> [
'required',
'string',
'digits:11',
Rule::unique('users', 'mobile')->ignore($this->user()->id)],
'user_province' => [
'nullable'
],
'user_city' => [
'nullable'
],
];
}
public function attributes(): array
{
return [
//
];
}
}