@php $editing = $campaign?->exists ?? false; $includeSelections = collect(old('include_list_ids', $selectedIncludeIds ?? []))->map(fn ($id) => (int) $id)->all(); $excludeSelections = collect(old('exclude_list_ids', $selectedExcludeIds ?? []))->map(fn ($id) => (int) $id)->all(); $nameValue = old('name', $campaign->name ?? $defaultValues['name']); $subjectValue = old('subject', $campaign->subject ?? $defaultValues['subject']); $preheaderValue = old('preheader', $campaign->preheader ?? $defaultValues['preheader']); $fromNameValue = old('from_name', $campaign->from_name ?? $defaultValues['from_name']); $fromEmailValue = old('from_email', $campaign->from_email ?? $defaultValues['from_email']); $replyToValue = old('reply_to_email', $campaign->reply_to_email ?? $defaultValues['reply_to_email']); $editorModeValue = old('editor_mode', $campaign->editor_mode ?? $defaultValues['editor_mode']); $fontFamilyValue = old('font_family', $campaign->font_family ?? $defaultValues['font_family']); $backgroundColorValue = old('background_color', $campaign->background_color ?? $defaultValues['background_color']); $foregroundColorValue = old('foreground_color', $campaign->foreground_color ?? $defaultValues['foreground_color']); $htmlBodyValue = old('html_body', $campaign->html_body ?? $defaultValues['html_body']); $textBodyValue = old('text_body', $campaign->text_body ?? $defaultValues['text_body']); $scheduleDefaults = \App\Support\CampaignBuilderSupport::scheduleFormValues( $editing ? (string) $campaign->getRawOriginal('scheduled_at') : null, $defaultValues['scheduled_timezone'], ); $scheduledLocalValue = old('scheduled_local', $scheduleDefaults['local_value']); $scheduledTimezoneValue = $defaultValues['scheduled_timezone']; $scheduledTimezoneLabel = $timezoneOptions[$scheduledTimezoneValue] ?? $scheduledTimezoneValue; $sendRateValue = old('send_rate_per_minute', $campaign->send_rate_per_minute ?? $defaultValues['send_rate_per_minute']); $listLookup = collect($lists)->keyBy(fn ($list) => (int) $list->id); $includeSummaryNames = collect($includeSelections) ->map(fn ($id) => $listLookup->get((int) $id)?->name) ->filter() ->values(); $excludeSummaryNames = collect($excludeSelections) ->map(fn ($id) => $listLookup->get((int) $id)?->name) ->filter() ->values(); $sendableCount = collect($includeSelections)->sum(fn ($id) => (int) ($listLookup->get((int) $id)?->active_contacts_count ?? 0)); $blockedCount = collect($excludeSelections)->sum(fn ($id) => (int) ($listLookup->get((int) $id)?->active_contacts_count ?? 0)); $audienceSummary = $includeSummaryNames->isNotEmpty() ? $includeSummaryNames->join(', ') : 'Sin audiencia'; @endphp
@csrf @if ($editing) @method('PUT') @endif
1 Crear2 Enviar3 Reporte

Campaign Builder

Plantilla
Elegir
Volver a campañas @if ($editing) Vista previa Reporte @endif
1

Remitente

Nombre, correo verificado y respuesta.

2

Inbox

Subject y preheader.

Aqui tambien puedes usar variables dentro del subject.

S
{{ $fromNameValue }}

{{ $subjectValue ?: 'Subject de tu campaña' }} {{ $preheaderValue ?: 'Preheader que empuja el clic' }}

Ahora
3

Audiencia

Incluye y excluye listas.

A enviar{{ number_format(max(0, $sendableCount - $blockedCount)) }}
Total{{ number_format($sendableCount) }}
Bloqueados{{ number_format($blockedCount) }}
El draft se guarda sin crear envios reales.
El draft se guarda sin crear envios reales.
@push('scripts') @endpush