fix family card issue
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Failing after 1m27s

This commit is contained in:
root
2026-09-12 03:16:10 -04:00
parent ce504c933e
commit 1787144f27
11 changed files with 382 additions and 11 deletions
@@ -2500,6 +2500,10 @@ class ParentController extends BaseController
return redirect()->back()->with('error', 'Failed to delete student.');
}
// Keep the normalized household, guardian, contact, and remaining
// student membership data aligned after every child removal.
(new \App\Services\FamilyDataSyncService($this->db))->syncForParent((int) $parentId);
// ✅ Check if parent has any students left
$remainingStudents = $this->studentModel
->where('parent_id', $parentId)