getTodayAbsentees(); foreach ($absentRecords as $record) { // Get parent user ID $parent = $userModel->find($record['parent_id']); if (!$parent) continue; NotificationService::toUser( $parent['id'], 'Daily Attendance Update', "{$record['student_name']} was marked absent on {$record['date']}.", ['in_app', 'email'] ); CLI::write("Sent summary to parent: {$parent['email']}", 'yellow'); } CLI::write("Attendance summary completed.", 'green'); } }