fix family card issue
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user