feat: implement barangay and household management with associated tests

This commit is contained in:
Developer
2026-06-29 15:02:52 +08:00
parent 9ac2ea7bda
commit b85fc255cf
124 changed files with 2894 additions and 192 deletions

View File

@@ -0,0 +1,43 @@
<?php
namespace App\Http\Requests\Admin;
use App\Models\HouseholdMember;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class UpdateAdminHouseholdMemberRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'relationship' => [
'required',
'string',
Rule::in([
HouseholdMember::RELATIONSHIP_HEAD,
HouseholdMember::RELATIONSHIP_SPOUSE,
HouseholdMember::RELATIONSHIP_CHILD,
HouseholdMember::RELATIONSHIP_PARENT,
HouseholdMember::RELATIONSHIP_SIBLING,
HouseholdMember::RELATIONSHIP_OTHER,
]),
],
'full_name' => [
'required',
'string',
'max:191',
],
'date_of_birth' => [
'nullable',
'date',
'before_or_equal:today',
],
];
}
}