Started work on Tour Booking

This commit is contained in:
TorstenS 2020-10-06 08:54:14 +02:00
parent 06fa9a3d95
commit e9f629db90
5 changed files with 54 additions and 85 deletions

View file

@ -23,6 +23,19 @@ class TourController extends Controller
return view('tour.index')->with('tours',$tours);
}
public function index_bookings($tour_id)
{
$tour=Tour::find($tour_id);
$bookings=array();
foreach($tour->getBookings($tour_id) as $booking) {
array_push($bookings,$booking);
}
error_log("Tour:index_bookings, tour_id=".$tour->id);
return view('tour.index_bookings')->with('tour',$tour)->with('bookings',$bookings);
}
/**
* Show the form for creating a new resource.
*