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;
 }
 public function getManageReserve()
 {
     $query = Reservation::orderBy('status')->paginate(10);
     $this->layout->content = View::make('admin.manage_reservation')->with('reserves', $query);
 }
 public function main()
 {
     View::share('page_title', 'Dashboard');
     $reservations = Reservation::orderBy('created_at', 'desc')->get();
     return View::make('admin.reservations.dashboard', compact('reservations'));
 }
Пример #4
0
 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'));
 }