当前位置: 首页>>代码示例>>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;未经允许,请勿转载。