diff --git a/motorradig/app/Http/Controllers/TourController.php b/motorradig/app/Http/Controllers/TourController.php index 247c5b5..d67d147 100644 --- a/motorradig/app/Http/Controllers/TourController.php +++ b/motorradig/app/Http/Controllers/TourController.php @@ -23,7 +23,7 @@ class TourController extends Controller public function index() { error_log("Tour:index"); - $tours=Tour::where('start','>',Carbon::now())->get(); + $tours=Tour::where('start','>',Carbon::now())->orderBy('start')->get(); $participantCount=array(); foreach($tours as $tour) { $result = DB::select('select count(*) as cnt from bookings where tour_id=?', [$tour->id]); @@ -35,7 +35,7 @@ class TourController extends Controller public function index_old() { error_log("Tour:index_old"); - $tours=Tour::where('start','<',Carbon::now())->get(); + $tours=Tour::where('start','<',Carbon::now())->orderBy('start')->get(); $participantCount=array(); foreach($tours as $tour) { $result = DB::select('select count(*) as cnt from bookings where tour_id=?', [$tour->id]);