@extends('layouts.portal') @section('title', 'Send communication') @section('subtitle', 'Pick the people, pick a template, add an optional note — preview it, then send. Every message is logged against the learner.') @section('actions') Communication history Email templates @endsection @section('content') @php($vb = '{'.'{')
@foreach(['course_details' => 'Course details', 'workshop_details' => 'Workshop details', 'batch_schedule' => 'Batch schedule', 'meeting_details' => 'Meeting details', 'payment_details' => 'Payment details', 'invoice' => 'Invoice', 'receipt' => 'Receipt', 'installment_schedule' => 'Installment schedule', 'attendance_report' => 'Attendance report', 'certificate' => 'Certificate', 'badge' => 'Badge', 'assessment_result' => 'Assessment result', 'enrollment_confirmation' => 'Enrollment confirmation', 'custom' => 'Custom'] as $k => $label) {{ $label }} @endforeach
@csrf @foreach($hints as $k => $v)@endforeach

1 · Template

@if($tpl)Edit template →@endif
Attachments: {{ $tpl && $tpl->attachments ? implode(', ', array_map(fn ($a) => str_replace('_', ' ', $a), $tpl->attachments)) : 'none' }} — added automatically when the recipient has the matching record.

2 · Recipients

@error('recipients'){{ $message }}@enderror
Change the selection below for the chosen mode. Only the active mode is used when sending.
Learners ({{ $students->count() }})
@foreach($students as $s)@endforeach
Batch
Leads ({{ $leads->count() }})
@foreach($leads as $l)@endforeach
Workshop registrants
Meeting participants
Email addresses

3 · Personal message (optional)

Used by "Course details" for leads, or to pick a learner's enrollment in that course.

Preview

as the first recipient sees it
@endsection @push('scripts')@endpush