From f945285f77b4b725ab6d1b5d6bdd721a6952e872 Mon Sep 17 00:00:00 2001 From: structix Date: Fri, 1 Jun 2018 23:55:10 +0200 Subject: [PATCH] Added Team model --- .../app/Http/Controllers/PagesController.php | 4 ++- tippspiel/app/Team.php | 34 +++++++++++++++++++ tippspiel/resources/views/dashboard.blade.php | 13 ++++--- 3 files changed, 45 insertions(+), 6 deletions(-) create mode 100755 tippspiel/app/Team.php diff --git a/tippspiel/app/Http/Controllers/PagesController.php b/tippspiel/app/Http/Controllers/PagesController.php index e613a39..2669c50 100644 --- a/tippspiel/app/Http/Controllers/PagesController.php +++ b/tippspiel/app/Http/Controllers/PagesController.php @@ -3,12 +3,14 @@ namespace App\Http\Controllers; use Illuminate\Http\Request; +use App\Team; class PagesController extends Controller { function dashboard() { + $teams = Team::all(); return view('dashboard')->with([ - + $teams => 'teams', ]); } } diff --git a/tippspiel/app/Team.php b/tippspiel/app/Team.php new file mode 100755 index 0000000..a390eab --- /dev/null +++ b/tippspiel/app/Team.php @@ -0,0 +1,34 @@ + - Type - Column heading - Column heading - Column heading + Nr. + Mannschaft A + Mannschaft B + Tipp + Bearbeiten + @foreach($teams as $t) - Default + name !!} Column content Column content Column content + @endforeach