db->table('invoices') ->select($select) ->where('parent_id', $parentId) ->get() ->getResultArray(); } public function markTuitionPaidForParent(int $parentId): void { if ($parentId <= 0) { return; } $this->db->table('students') ->where('parent_id', $parentId) ->update(['tuition_paid' => 1]); } }