/** * Function to retrieve datepicker * * User selects date + time to continue **/ public function getCalendar($pid) { //Add package to the session data Session::put('packageID', $pid); $package = Package::find($pid); // This groups all booking times by date so we can give a list of all days available. $data = ['packageName' => $package->package_name, 'days' => BookingDateTime::all()]; return view('BookAppointment', $data); }
function GetAvailableDays() { return response()->json(BookingDateTime::all()); }