{{-- resources/views/agent/files/archive-show.blade.php --}} @extends('layouts.contentLayoutMaster') @section('title', 'Archived Leads — Selection') @php // Defensive defaults so the partial won't explode if controller misses something $data = $data ?? []; $validTabs = ['life','mortgage','health']; $activeGroup = in_array(($activeGroup ?? ''), $validTabs, true) ? $activeGroup : (array_key_first($data) ?: 'life'); @endphp @section('content')

Archived Leads — Selected

Back to Archives
@if (empty($data) || (is_array($data) && collect($data)->flatten()->isEmpty()))
Nothing to show. Please go back to Archives and select one or more leads.
@else {{-- Reuse your purchased partial; it expects: data (array), activeGroup (string), fromArchive (bool) --}} @include('agent.leads.partials.purchased', [ 'data' => $data, 'activeGroup' => $activeGroup, 'fromArchive' => true, ]) @endif
@endsection