本文整理汇总了PHP中HomeController::get_year方法的典型用法代码示例。如果您正苦于以下问题:PHP HomeController::get_year方法的具体用法?PHP HomeController::get_year怎么用?PHP HomeController::get_year使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HomeController
的用法示例。
在下文中一共展示了HomeController::get_year方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showFellowSelect
public function showFellowSelect($city_id)
{
$fellowName = "Propel Fellow";
$home = new HomeController();
$year = $home->get_year();
$fellows = Group::where('name', '=', $fellowName)->first()->fellow()->distinct()->where('city_id', '=', $city_id)->where('year', '=', $year)->where('status', '=', '1')->where('user_type', '=', 'volunteer')->get();
//return $fellows;
return View::make('city.select-fellow')->with('fellows', $fellows);
}
示例2: HomeController
@section('navbar-links')
<!--<li><a href="{{URL::to('/')}}/calendar">Calendar</a></li>
<li><a href="{{URL::to('/')}}/attendance">Attendance</a></li>
<li><a href="{{URL::to('/')}}/wingman-journal">Wingman Journal</a></li>-->
@if(!empty($_SESSION['original_id']) && $_SESSION['user_id'] != $_SESSION['original_id'])
<li class=""><a href="{{URL::to('/city-change/back-to-national')}}">Back to National</a></li>
@endif
<li class=""><a>
<?php
$i = 0;
$id = $_SESSION['user_id'];
$home = new HomeController();
$name = DB::table('User')->select('name')->where('id', $id)->first();
echo $name->name . ' (';
$groups = DB::table('UserGroup')->join('Group', 'Group.id', '=', 'UserGroup.group_id')->select('Group.name')->where('user_id', $id)->where('year', $home->get_year())->get();
$result = array();
foreach ($groups as $group) {
$result[$i] = $group->name;
$i++;
}
$value = join(',', $result);
echo $value . ')';
?>
</a>
</li>
<li class=""><a href="{{URL::to('/logout')}}">Logout</a></li>
@show