當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Reservation::orderBy方法代碼示例

本文整理匯總了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;
 }
開發者ID:jacobDaeHyung,項目名稱:Laravel-Real-Estate-Manager,代碼行數:9,代碼來源:Reservation.php

示例2: getManageReserve

 public function getManageReserve()
 {
     $query = Reservation::orderBy('status')->paginate(10);
     $this->layout->content = View::make('admin.manage_reservation')->with('reserves', $query);
 }
開發者ID:hlmasterchief,項目名稱:lacrestaurant,代碼行數:5,代碼來源:AdminController.php

示例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'));
 }
開發者ID:jacobDaeHyung,項目名稱:Laravel-Real-Estate-Manager,代碼行數:6,代碼來源:DashboardController.php

示例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'));
 }
開發者ID:jmramos02,項目名稱:catering,代碼行數:9,代碼來源:AdminController.php


注:本文中的Reservation::orderBy方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。