public function update($id, RsvpRequest $request) { $rsvp = Rsvp::findOrFail($id); $rsvp->update($request->all()); return redirect('pages.thanks'); }
/** * Delete a row from the rsvp table corresponding to the event id and the user id. * * @param int $id * @return \Illuminate\Http\Response */ public function unattendEvent($id) { //deletes the row corresponding to the current user and the eventid $id from //the rsvp table Rsvp::where(['userid' => Auth::user()->id, 'eventid' => $id])->delete(); //redirects to the events page. return redirect('/events'); }
public function guestlist() { $rsvps = Rsvp::all(); return view('pages.guestlist', compact('rsvps')); }
/** * Show the page listing all the tickets in printable format for an event. * * @param int $id * @return \Illuminate\Http\Response */ public function printAttendees($id) { $ev = Event::where('id', $id)->firstorfail(); $atns = Rsvp::join('users', 'users.id', '=', 'rsvp.userid')->select('*')->where('rsvp.eventid', '=', $id)->get(); return view('admin/printall', ['atns' => $atns, 'ev' => $ev]); }