@extends('layouts.portal') @section('title', 'Promotions & offers') @section('subtitle', 'Market a course, a workshop or the academy with a popup, an announcement bar and a shareable landing page. Every view, click, lead, application and admission is counted.') @section('actions')@endsection @section('content')
@forelse($offers as $o) @php $f = $funnel[$o->id]; $impr = $o->views + $o->landing_views; @endphp @empty @endforelse
PromotionPromotes · shown onWindowViewsClicksLeadsAppliedAdmittedStatus
{{ $o->name }}
{{ \Illuminate\Support\Str::limit($o->headline, 70) }}
@if($o->show_popup)Popup@endif @if($o->show_bar)Top bar@endif @if($o->slug)Landing page@endif @if($o->discount_label){{ $o->discount_label }}@endif @if($o->code){{ $o->code }}@endif
{{ $o->event?->title ?? $o->course?->title ?? 'Academy-wide' }}
{{ \App\Models\Offer::TARGETS[$o->target_type] ?? $o->target_type }}@if($o->target_type === 'course') · {{ \App\Models\Course::find($o->target_id)?->title }}@elseif($o->target_type === 'event') · {{ \App\Models\Event::find($o->target_id)?->title }}@endif · {{ $o->trigger === 'exit' ? 'exit intent' : ($o->trigger === 'scroll' ? 'on scroll' : 'after '.$o->delay_seconds.'s') }}{{ $o->device !== 'all' ? ' · '.$o->device : '' }}
{{ $o->starts_at?->format('d M') ?? 'Now' }} → {{ $o->ends_at?->format('d M Y') ?? 'open-ended' }} {{ number_format($impr) }} {{ number_format($o->clicks) }} {{ $o->leads_count }}@if($impr)
{{ round($o->leads_count / $impr * 100, 1) }}%
@endif
{{ $f['applications'] }} {{ $f['admitted'] }} @if($o->isLive())Live@elseif($o->is_active)Scheduled / ended@elseOff@endif
@if($o->slug)@endif @if($o->is_active)
@csrf @method('DELETE')
@endif
@foreach(array_merge([null], $offers->all()) as $o) @php $p = $o ? 'o'.$o->id.'-' : 'on-'; @endphp @endforeach @foreach($offers->filter(fn ($o) => $o->slug) as $o) @endforeach @endsection @push('scripts')@endpush