diff options
Diffstat (limited to 'resources/views/index.blade.php')
-rw-r--r-- | resources/views/index.blade.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php new file mode 100644 index 0000000..cde358d --- /dev/null +++ b/resources/views/index.blade.php @@ -0,0 +1,49 @@ +@extends('layout.default') + +@section('content') + + +@foreach ($tournaments as $tournament) + +<div class="container"> + <div class="mt-4"> + <h1>{{ $tournament->name }}</h1> + </div> + + <div class="mt-4"> + + <table class="table"> + + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">Home</th> + <td scope="col"></td> + <th scope="col">Away</th> + <th scope="col">Venue</th> + <th scope="col">Referee</th> + <th scope="col">Date</th> + </tr> + </thead> + + <tbody> + + @foreach ($tournament->matches as $match) + <tr> + <th scope="row">{{ $match->id }}</th> + <td>{{ $match->homeTeam()->first()->getName() }}</td> + <td>{{ $match->score }} <br> {{$match->half_score}}</td> + <td>{{ $match->awayTeam()->first()->getName() }}</td> + <td>{{ $match->getDisplayName() }}</td> + <td>{{ $match->referee }}</td> + <td>{{ $match->getDisplayDate() }}</td> + </tr> + @endforeach + </tbody> + + </table> + </div> +</div> +@endforeach + +@endsection
\ No newline at end of file |