git add .

git commit "implement user management with search sort permissions and safe delete"
This commit is contained in:
2026-08-18 15:18:57 +03:30
parent bff0c7ea4d
commit 0722cf3120
10 changed files with 564 additions and 17 deletions
@@ -0,0 +1,35 @@
<?php
namespace App\Http\Requests\Admin\User;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class ChangePasswordRequest 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 [
'password' => [
'required',
'min:8',
'confirmed',
],
];
}
}
@@ -0,0 +1,49 @@
<?php
namespace App\Http\Requests\Admin\User;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
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',
'string'
],
'last_name'=>[
'required',
'string'
],
'email'=>[
'required',
'email',
Rule::unique('users','email')
->ignore($this->user->id),
],
'mobile'=>[
'required',
Rule::unique('users','mobile')
->ignore($this->user->id),
]
];
}
}