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


PHP Event::select方法代码示例

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


在下文中一共展示了Event::select方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCalendar

 public function getCalendar()
 {
     $eventos = Event::select('titulo_evento')->where('user_id', '=', Auth::user()->id)->take(4)->get();
     //$datos['cTrabajo']= \DB::table('trabajo')->count();
     $array = Event::where('user_id', '=', Auth::user()->id)->get();
     return view('Calendar/calendar', compact('array', 'datos', 'eventos'));
 }
开发者ID:TeDyGuN,项目名称:SIS-EAEN,代码行数:7,代码来源:FullCalendarController.php

示例2: eventsUsuari

 public static function eventsUsuari($cultius)
 {
     if (!is_null($cultius)) {
         //	foreach ($cultius as $cultiu){
         //		dd($cultiu);
         if (!is_null($cultius)) {
             $results = Event::select('id', 'headline', 'text', 'startDate', 'cultiu_id')->where(function ($query) use($cultius) {
                 foreach ($cultius as $value) {
                     if (!is_null($value)) {
                         //you can use orWhere the first time, dosn't need to be ->where
                         $query->orWhere('cultiu_id', $value['id']);
                     }
                 }
             })->orderBy('updated_at', 'desc')->get()->toArray();
             foreach ($results as $passa) {
                 $dades[] = $passa;
             }
         }
         //}
     }
     //dd($dades);
     if (!is_null($dades)) {
         return $dades;
     }
 }
开发者ID:vi1004t,项目名称:pfg,代码行数:25,代码来源:Event.php

示例3: events

 public function events(Request $request)
 {
     if ($request->start && $request->end) {
         return Event::whereRaw("start between '" . $request->start . "' and '" . $request->end . "'")->with("order")->get();
     } else {
         return Event::select("*")->get();
     }
 }
开发者ID:znittzel,项目名称:datianew,代码行数:8,代码来源:CalendarController.php

示例4: overview

 /**
  * Display events that require CERFs.
  *
  * @return \Illuminate\View\View
  */
 public function overview()
 {
     // Ensures only events created after implementation of online CERFs system are checked.
     $oldestAllowed = Carbon::create(2015, 11, 1, 8, 0, 0, 'UTC');
     $newestAllowed = Carbon::now();
     // Finds IDs of all events that do not have an associated approved CERF.
     $eventIdsWithoutCerfs = Event::select('events.id')->leftJoin('cerfs', 'events.id', '=', 'cerfs.event_id')->whereNull('cerfs.id')->orWhere('cerfs.approved', false)->get();
     // TODO Paginate events that need to be CERFed.
     // Retrieves events without CERFs based on ID. Casts to array to pass to foreach loop in view.
     $eventsWithoutCerfs = Event::find($eventIdsWithoutCerfs->toArray());
     $userCerfs = Cerf::where('reporter_id', Auth::id())->where('approved', false)->get();
     return view('pages.cerfs.overview', compact('eventsWithoutCerfs', 'userCerfs', 'oldestAllowed', 'newestAllowed'));
 }
开发者ID:natalieduong,项目名称:konnection,代码行数:18,代码来源:CerfsController.php

示例5: index

 public function index()
 {
     /* Get data for timeline */
     $eventDates = \App\Event::select('timelineDate')->distinct()->get()->pluck('timelineDate')->toArray();
     $mediaDates = \App\Media::select('timelineDate')->distinct()->get()->pluck('timelineDate')->toArray();
     $dates = array_unique(array_merge($eventDates, $mediaDates), SORT_REGULAR);
     usort($dates, array('\\App\\Http\\Controllers\\TimelineController', 'dateCompare'));
     $media = array();
     $events = array();
     foreach ($dates as $date) {
         $eventsForThisDate = \App\Event::get()->where('timelineDate', $date)->toArray();
         $mediaForThisDate = \App\Media::get()->where('timelineDate', $date)->toArray();
         usort($eventsForThisDate, array('\\App\\Http\\Controllers\\TimelineController', 'itemCompare'));
         usort($mediaForThisDate, array('\\App\\Http\\Controllers\\TimelineController', 'itemCompare'));
         $media[$date] = $mediaForThisDate;
         $events[$date] = $eventsForThisDate;
     }
     /* Get data for filters */
     $mediums = \App\Media::select('medium')->distinct()->get()->pluck('medium')->toArray();
     $tags = \App\EventTag::select('tag')->distinct()->get()->pluck('tag')->toArray();
     $series = \App\Series::get()->pluck('seriesAbbreviation');
     sort($mediums);
     sort($tags);
     $eventIDToTags = array();
     $eventIDs = \App\Event::get()->pluck('id');
     foreach ($eventIDs as $eventID) {
         $eventIDToTags[$eventID] = \App\EventTag::select('tag')->where('eventID', $eventID)->get()->pluck('tag')->toArray();
     }
     $seriesToCollections = array();
     foreach ($series as $thisSeries) {
         $seriesToCollections[$thisSeries] = \App\Media::select('collection')->where('series', $thisSeries)->distinct()->get()->pluck('collection')->toArray();
     }
     /* Get event-media relationships */
     $eventMediaPairs = \App\EventMedia::get(array('eventID', 'mediaID'))->toArray();
     return view('timeline')->with(['seriesToCollections' => $seriesToCollections, 'eventMediaPairs' => $eventMediaPairs, 'eventIDToTags' => $eventIDToTags, 'mediums' => $mediums, 'events' => $events, 'dates' => $dates, 'media' => $media, 'tags' => $tags]);
 }
开发者ID:erikkacsm,项目名称:timeline,代码行数:36,代码来源:TimelineController.php

示例6: getTittlesEvents

 public function getTittlesEvents()
 {
     $eventos = Event::select('titulo_evento')->where('user_id', '=', Auth::user()->id)->take(4)->get();
     return $eventos;
 }
开发者ID:TeDyGuN,项目名称:SIS-EAEN,代码行数:5,代码来源:CalendarInjectionController.php

示例7: index

 /**
  * View a list of events.
  * @return mixed
  */
 public function index()
 {
     $events = Event::select('events.*')->join('event_times', 'events.id', '=', 'event_times.event_id')->orderBy('event_times.start', 'DESC')->distinct()->distinctPaginate(15);
     $this->checkPagination($events);
     return View::make('events.index')->withEvents($events);
 }
开发者ID:backstagetechnicalservices,项目名称:website,代码行数:10,代码来源:EventsController.php

示例8: editEventInfo

 /**
  * Show the form for editing an existing event's info.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function editEventInfo($id)
 {
     $event = Event::select('events.*')->where('id', '=', $id)->firstorfail();
     return view('admin/edit', ['event' => $event]);
 }
开发者ID:xRokco,项目名称:websysproject,代码行数:11,代码来源:AdminController.php


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