本文整理汇总了PHP中Club::lists方法的典型用法代码示例。如果您正苦于以下问题:PHP Club::lists方法的具体用法?PHP Club::lists怎么用?PHP Club::lists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Club
的用法示例。
在下文中一共展示了Club::lists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showSchedule
/**
* Generates the view for a specific schedule.
*
* Also used for a specific task (schedule without a related event).
*
* @param int $id
* @return view scheduleViewById
* @return Schedule $schedule
* @return ScheduleEntry[] $entries
*/
public function showSchedule($id)
{
$schedule = Schedule::with('getClubEvent.getPlace')->findOrFail($id);
if (!Session::has('userId') and (is_null($schedule->evnt_id) or $schedule->getClubEvent()->GetResults()->evnt_is_private == 1)) {
Session::put('message', Config::get('messages_de.access-denied'));
Session::put('msgType', 'danger');
return Redirect::action('MonthController@showMonth', array('year' => date('Y'), 'month' => date('m')));
}
$entries = ScheduleEntry::where('schdl_id', '=', $id)->with('getJobType', 'getPerson.getClub')->get();
$clubs = Club::lists('clb_title', 'id');
$persons = Cache::remember('personsForDropDown', 10, function () {
$timeSpan = new DateTime("now");
$timeSpan = $timeSpan->sub(DateInterval::createFromDateString('3 months'));
return Person::whereRaw("prsn_ldap_id IS NOT NULL\n\t\t\t\t\t\t\t\t\t AND (prsn_status IN ('aktiv', 'kandidat')\n\t\t\t\t\t\t\t\t\t OR updated_at>='" . $timeSpan->format('Y-m-d H:i:s') . "')")->orderBy('clb_id')->orderBy('prsn_name')->get();
});
return View::make('scheduleViewById', compact('entries', 'schedule', 'clubs', 'persons'));
}