@extends('layouts.app') @section('title', 'P2P Coin Marketplace') @push('styles') @endpush @section('content') @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif {{-- Hero --}}
🔒 Escrow-Protected P2P Trading
Coins are locked in escrow until payment is confirmed. Safe, transparent, and instant.
{{ $stats['total_listings'] }} Active Listings ₦{{ number_format($stats['total_volume']) }} Volume Avg ₦{{ number_format($stats['avg_price'], 2) }}/NC 1.5% Commission
{{-- How it works --}}
@foreach([ ['1','fas fa-tag','Post Listing','Seller posts NC for sale. Coins locked in escrow instantly.','rgba(99,102,241,.1)','#a5b4fc'], ['2','fas fa-shopping-cart','Place Order','Buyer selects amount and places order.','rgba(96,165,250,.1)','#60a5fa'], ['3','fas fa-money-bill-wave','Send Payment','Buyer sends payment to seller\'s bank account.','rgba(251,191,36,.1)','#fbbf24'], ['4','fas fa-unlock','Release Coins','Seller confirms payment → coins released to buyer.','rgba(76,175,80,.1)','var(--gl)'], ] as [$n,$icon,$title,$desc,$bg,$color])
{{ $n }}
{{ $title }}
{{ $desc }}
@endforeach
{{-- Listings Grid --}}
@if($listings->count())
@foreach($listings as $listing)
@if($listing->seller->avatar) @else
{{ strtoupper(substr($listing->seller->name,0,2)) }}
@endif
{{ $listing->seller->name }} @if($listing->seller->isKycApproved()) @endif
@if($listing->seller->isPartner()) 🤝 Partner @elseif($listing->seller->business?->isApproved()) 🏢 Business @else ♻️ User @endif
₦{{ number_format($listing->price_per_coin, 2) }} per NC
{{ number_format($listing->coins_available) }} NC · ≈ ₦{{ number_format($listing->totalNaira()) }}
Min {{ $listing->min_order_coins }} NC {{ ucfirst(str_replace('_',' ',$listing->payment_method)) }} @if($listing->seller->isPremium())⭐ Premium@endif
@if($listing->terms)
{{ Str::limit($listing->terms, 80) }}
@endif @auth @if(auth()->id() !== $listing->seller_id) @else
Your listing
@endif @else Login to Buy @endauth
@endforeach
@if($listings->hasPages())
{{ $listings->links() }}
@endif @else
No active listings

Be the first to sell NC on the marketplace!

@endif
{{-- Sell Panel --}} @auth
Post a Sell Listing
@csrf
Balance: {{ number_format(auth()->user()->getCoins()) }} NC
Coins locked in escrow on listing. 1.5% commission per trade.
@if($myOrders->count())
My Recent Orders
@foreach($myOrders as $order)
{{ number_format($order->coins_amount) }} NC
₦{{ number_format($order->total_naira) }}
{{ ucfirst($order->status) }}
@endforeach
@endif
@endauth
{{-- Buy Modal --}} @push('scripts') @endpush @endsection