From 453cc8104a9ef992b02f3b48780ce30842776481 Mon Sep 17 00:00:00 2001 From: structix Date: Sat, 2 Jun 2018 01:27:49 +0200 Subject: [PATCH] Fix + Debug --- tippspiel/app/Http/Controllers/PagesController.php | 1 + tippspiel/resources/views/dashboard.blade.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tippspiel/app/Http/Controllers/PagesController.php b/tippspiel/app/Http/Controllers/PagesController.php index 6bbf618..1ea3704 100644 --- a/tippspiel/app/Http/Controllers/PagesController.php +++ b/tippspiel/app/Http/Controllers/PagesController.php @@ -16,6 +16,7 @@ class PagesController extends Controller $teams = Team::all(); $matches = Match::all(); $tipps = Tipp::where('user', Auth::user()->id)->get(); + dd($tipss); return view('dashboard')->with([ 'teams' => $teams, diff --git a/tippspiel/resources/views/dashboard.blade.php b/tippspiel/resources/views/dashboard.blade.php index b684c43..ff3cb04 100644 --- a/tippspiel/resources/views/dashboard.blade.php +++ b/tippspiel/resources/views/dashboard.blade.php @@ -39,7 +39,7 @@ {!! $teams->find($match->teama)->name !!} {!! $teams->find($match->teamb)->name !!} {!! $match->resulta . ':' . $match->resultb !!} - {!! $tipps->where('matchid', $match->id)->resulta . ':' . $tipps->where('matchid', $match->id)->resultb !!} + {!! $tipps->where('matchid', $match->id)->resulta->first() . ':' . $tipps->where('matchid', $match->id)->resultb->first() !!} @if($tipps->where('matchid', $match->id)->resulta != null)