diff --git a/tippspiel/app/Http/Controllers/PagesController.php b/tippspiel/app/Http/Controllers/PagesController.php index 8758851..6bbf618 100644 --- a/tippspiel/app/Http/Controllers/PagesController.php +++ b/tippspiel/app/Http/Controllers/PagesController.php @@ -15,10 +15,12 @@ class PagesController extends Controller function dashboard() { $teams = Team::all(); $matches = Match::all(); + $tipps = Tipp::where('user', Auth::user()->id)->get(); return view('dashboard')->with([ 'teams' => $teams, 'matches' => $matches, + 'tipps' => $tipps, ]); } diff --git a/tippspiel/app/Tipp.php b/tippspiel/app/Tipp.php index 1baf692..f7b7f65 100755 --- a/tippspiel/app/Tipp.php +++ b/tippspiel/app/Tipp.php @@ -25,6 +25,7 @@ class Tipp extends Model 'matchid', 'resulta', 'resultb', + 'score', ]; /** diff --git a/tippspiel/resources/views/dashboard.blade.php b/tippspiel/resources/views/dashboard.blade.php index 2af7169..b684c43 100644 --- a/tippspiel/resources/views/dashboard.blade.php +++ b/tippspiel/resources/views/dashboard.blade.php @@ -39,12 +39,14 @@