@extends('frontend.layouts.app') @section('content')

Explore Games

Home Games

img img
Filter Options

Refine Games

@forelse($games as $game) @php $totalPrize = $game->prize_pool; $status = 'Completed'; $badgeClass = 'is-ended'; $buttonClass = 'completed-btn'; $buttonText = 'Leaderboard'; $buttonIcon = 'fa-trophy'; if (now()->between($game->quiz_start_time, $game->quiz_end_time)) { $status = 'LIVE'; $badgeClass = 'is-live'; $buttonClass = 'play-btn'; $buttonText = 'Play Now'; $buttonIcon = 'fa-play'; } elseif (now()->lt($game->quiz_start_time)) { $status = 'UPCOMING'; $badgeClass = 'is-upcoming'; $buttonClass = 'upcoming-btn'; $buttonText = 'View Details'; $buttonIcon = 'fa-eye'; } @endphp
{{ $game->title }} {{ $status }} {{ $game->category->name }}

{{ $game->title }}

Prize Pool ₹{{ number_format($totalPrize) }}
Entry Fee @if ($game->entry_fee > 0) ₹{{ number_format($game->entry_fee) }} @else FREE @endif
Questions {{ $game->questions->count() }}
Players {{ $game->max_participants ?? 'Unlimited' }}
Starts {{ \Carbon\Carbon::parse($game->quiz_start_time)->format('d M') }}
Time {{ \Carbon\Carbon::parse($game->quiz_start_time)->format('h:i A') }}
@if (now()->between($game->quiz_start_time, $game->quiz_end_time)) {{ $buttonText }} @elseif(now()->lt($game->quiz_start_time)) {{ $buttonText }} @else {{ $buttonText }} @endif
@empty

No Games Available

There are no games matching your filters.

View All Games
@endforelse
{{ $games->links('pagination::bootstrap-5') }}
@endsection