本文整理匯總了PHP中Self::getPollOptionsFromEid方法的典型用法代碼示例。如果您正苦於以下問題:PHP Self::getPollOptionsFromEid方法的具體用法?PHP Self::getPollOptionsFromEid怎麽用?PHP Self::getPollOptionsFromEid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Self
的用法示例。
在下文中一共展示了Self::getPollOptionsFromEid方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: details
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: inviteDetails
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);
}