@extends('layouts.user') @section('title') Pilots @endsection @section('content')
{{-- ── Slim banner (shared partial, slim modifier class) ── --}}
@include('partials.pilot.banner')
{{-- ── Sidebar (shared partial; -4rem for slim banner) ── --}}
@include('partials.pilot.sidebar')
{{-- ── Main content ── --}}
{{-- Page header --}}
Home

Find your Pilot.

Real traders. Real track records. Their strategy runs on your wallet, sized to whatever you deploy.

Checking session…
{{-- Tabs (My Follows tab only renders when user has follows) --}} @php // Tab persistence across sort reloads. Honour explicit // ?tab=browse|follows query param; otherwise fall back // to the historical default: follows if any, else browse. $defaultTab = $followCount > 0 ? 'follows' : 'browse'; $activeTab = in_array(request('tab'), ['browse', 'follows'], true) ? request('tab') : $defaultTab; // Guard against ?tab=follows when user has zero follows if ($activeTab === 'follows' && $followCount === 0) { $activeTab = 'browse'; } @endphp
@if($followCount > 0) @endif
{{-- ============================================================ BROWSE TAB ============================================================ --}}
{{-- Filter bar: pilot count + functional sort dropdown --}}
{{ count($pilotCards) }} {{ count($pilotCards) === 1 ? 'pilot' : 'pilots' }} active
@php $currentSort = request('sort', 'recommended'); $sortOptions = [ 'recommended' => 'Sort: Recommended', 'win_rate' => 'Sort: Win rate', 'profit_30d' => 'Sort: 30D profit', 'followers' => 'Sort: Followers', ]; @endphp
{{-- Pilot grid: filled in Step 5b --}}
@foreach ($pilotCards as $pilot) @include('partials.pilot.pilot-card', [ 'pilot' => $pilot, 'isAlreadyFollowing' => in_array((int) $pilot['id'], $followedPilotIds, true), ]) @endforeach
{{-- Apply to be a Pilot panel (link out for now, backend deferred to v1.1) --}}
Trader yourself?

Apply to be a Pilot

Verified pilots earn 30% of every follower's profit. One click to apply, admin reviews within 48 hours.

  • KYC verified · 30+ day account age
  • Personal trading history demonstrated
  • Admin approval required
@if($followCount > 0) {{-- ============================================================ MY FOLLOWS TAB ============================================================ --}}
{{-- Aggregate summary across all active follows --}} @php $aggToday = (float) ($followsAgg['today_profit'] ?? 0); $aggLife = (float) ($followsAgg['lifetime_profit'] ?? 0); $aggWallets = (float) ($followsAgg['total_wallet'] ?? 0); $aggCount = (int) ($followsAgg['follow_count'] ?? 0); $aggTodayStr = match(true) { $aggToday > 0 => '+$' . number_format($aggToday, 2), $aggToday < 0 => '-$' . number_format(abs($aggToday), 2), default => '$0.00', }; $aggLifeStr = match(true) { $aggLife > 0 => '+$' . number_format($aggLife, 2), $aggLife < 0 => '-$' . number_format(abs($aggLife), 2), default => '$0.00', }; $aggWalletStr= '$' . number_format($aggWallets, 2); $aggClass = $aggToday > 0 ? 'up' : ($aggToday < 0 ? 'down' : ''); @endphp
{{ $aggTodayStr }}

today across {{ $aggCount }} {{ $aggCount === 1 ? 'pilot' : 'pilots' }}

Lifetime {{ $aggLifeStr }} · Wallets {{ $aggWalletStr }}

{{-- Follow cards --}} @foreach($followCards as $follow) @include('partials.pilot.follow-card', ['follow' => $follow]) @endforeach
@endif
{{-- Topup Modal (single instance, populated by JS on open) --}} @include('partials.pilot.modal-topup', ['mainBalance' => $mainBalance]) {{-- Unfollow Modal (single instance, populated by JS on open) --}} @include('partials.pilot.modal-unfollow') @endsection