@extends('layouts.admin') @section('title', 'Admin Dashboard') @section('admin-content')
{{ $stats['users'] }} Total Users View Users →
{{ $stats['sellers'] }} Sellers Manage Sellers →
{{ $stats['products'] }} Products Manage Products →
{{ $stats['rfqs'] }} RFQs View RFQs →
Recent Activity
Real-time
@forelse($recentActivity as $activity) @php $icon = 'bi-circle'; $color = 'secondary'; $title = 'Activity'; $description = ''; switch($activity->type) { case 'user': $icon = 'bi-person-plus'; $color = 'primary'; $title = 'New User Registered'; $description = 'New user "' . $activity->name . '" has joined.'; break; case 'seller': $icon = 'bi-shop'; $color = 'success'; $title = 'New Seller Registration'; $description = 'Seller "' . $activity->company_name . '" registered.'; break; case 'product': $icon = 'bi-box-seam'; $color = 'warning'; $title = 'New Product Added'; $description = 'Product "' . Str::limit($activity->name, 30) . '" added by ' . ($activity->seller->company_name ?? 'Unknown') . '.'; break; case 'rfq': $icon = 'bi-megaphone'; $color = 'info'; $title = 'New RFQ Posted'; $description = 'Requirement for "' . Str::limit($activity->title, 30) . '" posted.'; break; } @endphp
{{ $title }}
{{ $activity->created_at->diffForHumans() }}

{{ $description }}

@empty
No recent activity found.
@endforelse
@endsection