当前位置: 首页>>代码示例>>PHP>>正文


PHP Event::getEvent方法代码示例

本文整理汇总了PHP中app\Event::getEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP Event::getEvent方法的具体用法?PHP Event::getEvent怎么用?PHP Event::getEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\Event的用法示例。


在下文中一共展示了Event::getEvent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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'));
 }
开发者ID:umSoftEng2GrpE,项目名称:partEZ,代码行数:25,代码来源:ApiEventDetailsController.php

示例2: details

 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'));
 }
开发者ID:maxewaschuk,项目名称:partEZ,代码行数:15,代码来源:ApiEventDetailsController.php

示例3: declarePollWinner

 public function declarePollWinner()
 {
     $uid = Auth::user()['uid'];
     $input = Request::all();
     $event = Event::getEvent($input['eid']);
     $event->date = $input['value'];
     if ($uid == $event->uid) {
         try {
             Event::saveEvent($event);
         } catch (Exception $e) {
             print '<script type="text/javascript">';
             print 'alert("The system has encountered an error please try again later")';
             print '</script>';
             return view('errors.error_event');
         }
         return view('events/success_date')->with('date', $input['value']);
     } else {
         return view('errors.error_event');
     }
 }
开发者ID:umSoftEng2GrpE,项目名称:partEZ,代码行数:20,代码来源:EventController.php


注:本文中的app\Event::getEvent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。