@php $title = $section->settings['title'] ?? 'Creator Spotlight'; $mode = $section->settings['mode'] ?? 'dynamic'; $manualKeys = $section->settings['manual_keys'] ?? ''; // store_name or identifier $vendors = collect(); if ($mode === 'manual' && filled($manualKeys)) { $keys = array_map('trim', explode(',', $manualKeys)); $vendors = \App\Modules\Vendor\Models\VendorProfile::with(['user.products' => fn($q) => $q->published()->visible()]) ->whereIn('store_slug', $keys) ->orWhereIn('store_name', $keys) ->where('is_approved', true) ->take(3) ->get(); } else { // Dynamic fallback based on sales/rating $vendors = \App\Modules\Vendor\Models\VendorProfile::with(['user.products' => fn($q) => $q->published()->visible()]) ->where('is_approved', true) ->withSum(['user.products as total_sales' => fn($q) => $q->published()->visible()], 'sales_count') ->orderByDesc('total_sales') ->take(3) ->get(); } @endphp
{{-- Refined Background Effect --}}
Elite Engineering Authors

{{ $title }}

{{ $subtitle ?? 'Discover the talent powering advanced digital systems.' }}

@if($vendors->isNotEmpty())
@foreach($vendors as $vendor)
{{-- Avatar & Badge --}}
{{ $vendor->store_name }}
{{-- Info --}}

{{ $vendor->store_name }}

{{ $vendor->description ?? 'Premium digital assets and elite architecture.' }}

{{-- Stats --}}
{{ $vendor->products->count() }} Assets
{{ number_format($vendor->total_sales ?? 0) }} Sales
{{-- CTA --}} View Complete Catalog
@endforeach
@else

No Elite Engineering Authors Discovered

@endif