minor fixes
This commit is contained in:
parent
af73b49cfa
commit
60d74cc88d
3 changed files with 7 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue