@extends('layouts.app') @section('title', __('messages.home')) @section('content') @php $locale = app()->getLocale(); @endphp

{{ __('messages.matches') }}

{{ __('messages.view_all') }}
@forelse($liveMatches as $match) @include('partials.match-card-ticker', ['match' => $match]) @empty
{{ __('messages.no_live_matches') }}
@endforelse
@forelse($todayMatches as $match) @include('partials.match-card-ticker', ['match' => $match]) @empty
{{ __('messages.no_matches_today') }}
@endforelse
@forelse($yesterdayMatches as $match) @include('partials.match-card-ticker', ['match' => $match]) @empty
{{ __('messages.no_matches_yesterday') }}
@endforelse

{{ __('messages.live_matches') }}

@if($liveMatches->count() > 0)
@foreach($liveMatches as $match)
{{ $match->league->name_en }} {{ $match->status }}'
{{ $match->home_team_name_en }}
{{ $match->home_score }} : {{ $match->away_score }}
{{ __('messages.live_now') }}
{{ $match->away_team_name_en }}
@endforeach
@else

{{ __('messages.no_live_matches') }}

{{ __('messages.auto_update_msg') }}

@endif

{{ __('messages.standings_table') }}

@foreach($standingsLeagues as $league) @endforeach
@foreach($standingsLeagues as $league)
@php $standings = is_array($league->standings_json) ? ($league->standings_json[0] ?? []) : []; $topTeams = array_slice($standings, 0, 5); @endphp @foreach($topTeams as $row) @endforeach
# {{ __('messages.team') }} PL PTS
{{ $row['rank'] }}
{{ $row['team']['name'] }}
{{ $row['all']['played'] }} {{ $row['points'] }}
@endforeach

{{ __('messages.latest_news') }}

{{ __('messages.view_all') }}

{{ __('messages.upcoming_matches') }}

@foreach($upcomingMatches as $match)
{{ $match->match_date->format('Y-m-d H:i') }}
{{ $match->{'home_team_name_'.$locale} ?: $match->home_team_name_en }} VS {{ $match->{'away_team_name_'.$locale} ?: $match->away_team_name_en }}
@endforeach

{{ __('messages.leagues') }}

@foreach($leagues as $league) {{ $league->{'name_'.$locale} ?: $league->name_en }} @endforeach
@endsection