/**
  * Remove the specified event from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if (!Sentry::getUser()) {
         return Redirect::route('sessions.create');
     }
     EventRole::destroy($id);
     return Redirect::route('events.index');
 }
Exemplo n.º 2
0
 /**
  * Display the specified event.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $event = \asb\Event::findOrFail($id);
     $roles = EventRole::where('event_id', '=', $event->id)->get();
     $dates = EventDate::where('event_id', '=', $event->id)->get();
     $attachments = EventAttachment::where('event_id', '=', $event->id)->get();
     $comments = EventComment::where('event_id', '=', $event->id)->get();
     return View::make('events.show', compact('event', 'roles', 'dates', 'attachments', 'comments'));
 }
 /**
  * Display the specified event.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     if (!Sentry::getUser()) {
         return Redirect::route('sessions.create');
     }
     $event = \asb\Event::findOrFail($id);
     $roles = EventRole::where('event_id', '=', $event->id)->get();
     $dates = EventDate::where('event_id', '=', $event->id)->get();
     $attachments = EventAttachment::where('event_id', '=', $event->id)->get();
     $comments = EventComment::where('event_id', '=', $event->id)->get();
     $inventories = Equipment::all();
     $scheduled = EventEquipment::where('event_id', '=', $event->id)->get();
     return View::make('events.show', compact('event', 'roles', 'dates', 'attachments', 'comments', 'inventories', 'scheduled'));
 }
Exemplo n.º 4
0
 /**
  * Remove the specified event from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     EventRole::destroy($id);
     return Redirect::route('events.index');
 }