Ejemplo n.º 1
0
 public function getNonParticipants()
 {
     if (!$this->event_unique_link) {
         throw new Exception("No event unique link here");
     }
     return \PlayFooty\Participant::where('event_unique_link', $this->event_unique_link)->where('playing', 0)->get();
 }
Ejemplo n.º 2
0
 public function optOut(Request $request, \PlayFooty\Event $event, $participantId)
 {
     $participant = \PlayFooty\Participant::where('event_unique_link', $event->event_unique_link)->where('id', $participantId)->firstOrFail();
     $request->session()->flash('flashMessage', $participant->name . ' sent off!');
     Event::fire(new ParticipantOptOutEvent($event, $participant));
     $participant->delete();
     return back();
 }