@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            
                    @if (isset($tournaments) && !empty($tournaments))
                    <table class="table table-dark">
                        <thead>
                            <tr>
                            <th scope="col">#</th>
                            <th scope="col">Nom</th>
                            <th scope="col">Jeu</th>
                            <th scope="col">Date</th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach($tournaments as $tournament)
                            <tr>
                            <th scope="row">{{$tournament->id_tournament}}</th>
                            <td>{{$tournament->description}}</td>
                            <td>{{$tournament->titre}}</td>
                            <td>{{$tournament->tournament_date}}</td>
                            </tr>
                            @endforeach
                        </tbody>
                    </table>
                    @endif
            
        </div>
    </div>
</div>
@endsection
