コード例 #1
0
 public static function details(Request $request)
 {
     //Note this is piggybacking on regular event controller functions, beware of changing them!!
     $eid = $request->eid;
     $event = Event::getEvent($eid);
     $invites = Self::getInvitesFromEid($eid);
     $all_poll_options = Self::getPollOptionsFromEid($eid);
     $itemslist = Event::getEventItems($eid);
     $userRSVP = Invite::getUserRSVP($eid);
     $items = [];
     $item_users = [];
     $ticketcost = (string) $event['ticketprice'];
     if (!strpos($ticketcost, '.')) {
         $ticketcost = $ticketcost . ".00";
     }
     foreach ($itemslist as $item) {
         array_push($items, $item);
         if ($item->uid != 0) {
             $tmpUser = User::getById($item->uid);
             array_push($item_users, $tmpUser);
         }
     }
     $chat_messages = MessageController::getMessagesFromEid($eid);
     return response()->json(compact('event', 'all_poll_options', 'items', 'invites', 'chat_messages', 'item_users', 'userRSVP', 'ticketcost'));
 }
コード例 #2
0
 public function details(Request $request)
 {
     //Note this is piggybacking on regular event controller functions, beware of changing them!!
     $eid = $request['eid'];
     $event = Event::getEvent($eid);
     $invites = EventController::getInvitesFromEid($eid);
     $all_poll_options = EventController::getPollOptionsFromEid($eid);
     $itemslist = Event::getEventItems($eid);
     $items = [];
     foreach ($itemslist as $item) {
         array_push($items, $item);
     }
     $chat_messages = MessageController::getMessagesFromEid($eid);
     return response()->json(compact('event', 'all_poll_options', 'items', 'invites', 'chat_messages'));
 }
コード例 #3
0
 public function inviteDetails($eid)
 {
     $event = Event::find($eid);
     $invites = Self::getInvitesFromEid($eid);
     $all_poll_options = Self::getPollOptionsFromEid($eid);
     $chat_messages = MessageController::getMessagesFromEid($eid);
     return view('events/event_details_invite')->with('event', $event)->with('all_options', $all_poll_options)->with('invites', $invites)->with('chat_messages', $chat_messages);
 }