本文整理汇总了PHP中Reservation::orderBy方法的典型用法代码示例。如果您正苦于以下问题:PHP Reservation::orderBy方法的具体用法?PHP Reservation::orderBy怎么用?PHP Reservation::orderBy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reservation
的用法示例。
在下文中一共展示了Reservation::orderBy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dropdown
public static function dropdown()
{
$properties = Reservation::orderBy('created_at', 'desc')->get();
$nodes = array();
foreach ($properties as $p) {
$nodes[$p->id] = $p->id . ' | ' . $p->firstname . ' ' . $p->lastname;
}
return $nodes;
}
示例2: getManageReserve
public function getManageReserve()
{
$query = Reservation::orderBy('status')->paginate(10);
$this->layout->content = View::make('admin.manage_reservation')->with('reserves', $query);
}
示例3: main
public function main()
{
View::share('page_title', 'Dashboard');
$reservations = Reservation::orderBy('created_at', 'desc')->get();
return View::make('admin.reservations.dashboard', compact('reservations'));
}
示例4: index
public function index()
{
$reservation = Reservation::where(['reservation_start' => Carbon::now()->toDateString(), 'status' => 'Approved'])->update(array('status' => 'Event Ongoing'));
$reservation = Reservation::where(['reservation_start' => Carbon::now()->toDateString(), 'status' => 'Down Payment'])->update(array('status' => 'Event Ongoing'));
//return Carbon::now()->toDateString();
$reservation = Reservation::where('reservation_end', '<', Carbon::now()->toDateString())->where('status', '=', 'Event Ongoing')->update(array('status' => 'Event End'));
$reservation = Reservation::orderBy('date_request')->paginate(10);
return View::make('admin.index', compact('reservation'));
}