@extends('layouts.user_type.auth') @section('pageTitle', $campaign->exists ? 'Edit campaign' : 'New campaign') @section('pageSub', 'Pick who gets it, write 3–4 short personal emails, and let it send slowly. Replies stop the sequence for that lab.') @section('pageActions') Back @endsection @section('home') @include('pages_admin.marketing._nav') @include('components.alert') @php $seg = $campaign->segment ?? []; $sel = fn ($key) => collect(old("segment.$key", $seg[$key] ?? []))->map(fn ($v) => (string) $v)->all(); $steps = old('steps', $steps); $typeLabel = fn ($t) => str_replace(['Calibration_and_testing', '_'], ['Calibration & testing', ' '], $t); @endphp
@csrf
{{-- 1. Basics --}}
1 Campaign
Only you see this. Name it by segment, e.g. "Gujarat calibration labs – Nov".
{{-- 2. Audience --}}
2 Who gets it
Nothing selected in a group = all. Labs that unsubscribed, bounced, replied or are already in another running campaign are skipped automatically.
Stage
@foreach (['new' => 'New — never emailed', 'contacted' => 'Contacted — no reply yet'] as $v => $label) @endforeach
Lab type
@foreach ($options['lab_types'] as $v => $n) @endforeach
State
@foreach ($options['states'] as $v => $n) @endforeach
@foreach ($options['cities'] as $v => $n) @endforeach
{{-- 3. Emails --}}
3 The emails
Write like a person, not a brochure: short, plain text, one question, no images or attachments. The recommended sequence is filled in — edit it in your own words.
Personalise — click to insert at the cursor
@foreach ($placeholders as $p) @php $tag = str_repeat('{', 2) . $p . str_repeat('}', 2); @endphp @endforeach
{{-- Side: audience size, sending, preview, save --}}
@endsection