diff --git a/motorradig/app/Http/Controllers/TourController.php b/motorradig/app/Http/Controllers/TourController.php index c29fc78..75b5b99 100644 --- a/motorradig/app/Http/Controllers/TourController.php +++ b/motorradig/app/Http/Controllers/TourController.php @@ -25,9 +25,11 @@ class TourController extends Controller error_log("Tour:index"); $tours=Tour::where('start','>',Carbon::now())->orderBy('start')->get(); $participantCount=array(); - foreach($tours as $tour) { + foreach($tours as $key => $tour) { $result = DB::select('select count(*) as cnt from bookings where tour_id=?', [$tour->id]); $participantCount[$tour->id] = $result[0]->cnt; + $tours[$key]->start=Tour::toGermanDate($tour->start); + $tours[$key]->deadline=Tour::toGermanDate($tour->deadline); } return view('tour.index')->with('tours',$tours)->with('participantCount',$participantCount); } @@ -37,9 +39,11 @@ class TourController extends Controller error_log("Tour:index_old"); $tours=Tour::where('start','<',Carbon::now())->orderBy('start')->get(); $participantCount=array(); - foreach($tours as $tour) { + foreach($tours as $key => $tour) { $result = DB::select('select count(*) as cnt from bookings where tour_id=?', [$tour->id]); $participantCount[$tour->id] = $result[0]->cnt; + $tours[$key]->start=Tour::toGermanDate($tour->start); + $tours[$key]->deadline=Tour::toGermanDate($tour->deadline); } return view('tour.index_old')->with('tours',$tours)->with('participantCount',$participantCount); } diff --git a/motorradig/resources/views/home.blade.php b/motorradig/resources/views/home.blade.php index 013064f..57372af 100644 --- a/motorradig/resources/views/home.blade.php +++ b/motorradig/resources/views/home.blade.php @@ -18,7 +18,7 @@ @endif -
+
{!! $content !!}
diff --git a/motorradig/resources/views/tour/index.blade.php b/motorradig/resources/views/tour/index.blade.php index 9ebfaec..5acb955 100644 --- a/motorradig/resources/views/tour/index.blade.php +++ b/motorradig/resources/views/tour/index.blade.php @@ -9,15 +9,6 @@

Download

- - -
.
- @if(Auth::user()->role=="ADMIN" or Auth::user()->rolde=="MEMBER")

Neue Tour anlegen