migrate to gtea from bistbucket

This commit is contained in:
2026-03-15 17:08:23 +07:00
commit 129ca2260c
3716 changed files with 566316 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace Modules\HRM\Http\Requests\Employee;
use Illuminate\Foundation\Http\FormRequest;
class EmployeeStoreRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
'first_name' => ['required', 'string', 'max:255', 'regex:/^[a-zA-Z\s]+$/'],
'last_name' => ['nullable', 'string', 'max:255', 'regex:/^[a-zA-Z\s]+$/'],
'email' => ['nullable', 'string', 'email', 'max:255', 'regex:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/', 'unique:users,email'],
'phone' => ['required', 'string', 'regex:/^(\+?\d{1,4}|\d{1,4})?\d{7,15}$/', 'unique:users,phone'],
'password' => ['required', 'confirmed', 'string', 'min:8'],
'role_id' => ['required', 'integer', 'exists:roles,id'],
'avatar' => ['nullable'],
];
}
public function messages()
{
return [
'email.unique' => 'The email has already been taken.',
'phone.unique' => 'The phone number has already been registered.',
'password.confirmed' => 'The password confirmation does not match.',
];
}
public function authorize(): bool
{
return true;
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace Modules\HRM\Http\Requests\Employee;
use Illuminate\Foundation\Http\FormRequest;
class EmployeeUpdateRequest extends FormRequest
{
public function rules(): array
{
return [
'first_name' => ['required', 'string', 'max:255', 'regex:/^[a-zA-Z\s]+$/'],
'last_name' => ['nullable', 'string', 'max:255', 'regex:/^[a-zA-Z\s]+$/'],
'email' => [
'nullable',
'string',
'email',
'max:255',
'regex:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/',
],
'phone' => [
'nullable',
'string',
'regex:/^(\+?\d{1,4}|\d{1,4})?\d{7,15}$/',
],
'role_id' => ['required', 'integer', 'exists:roles,id'],
'avatar' => ['nullable'],
];
}
public function authorize(): bool
{
return true;
}
}