title = "Edit Booking" url = "/booking/:id/edit/1" layout = "Dashboard" is_hidden = 0 [session] security = "user" allowedUserGroups[] = "admin" allowedUserGroups[] = "supplier" redirect = "dashboard/login" == vendor; $this['vendors'] = Vendor::where('id', $user->vendor)->first(); $this['bookings'] = Bookings::where('id', $this->param('id'))->first(); $this['tickets'] = Ticket::orderBy('created_at', 'desc')->where('vendor_id', $user->vendor)->get(); $this['allocations'] = Allocation::where('vendor_id', $user->vendor)->get(); } $this['allocation'] = Allocation::make(); } function onUpdate() { date_default_timezone_set('Asia/Singapore'); $vendor = Input::post('vendor2'); $arrival_date = Input::post('arrival_date'); $this['arrival_date'] = Input::post('arrival_date'); $user = Auth::getUser(); if ($user) { $this['vendor'] = $user->vendor; $this['vendors'] = Vendor::where('id', $user->vendor)->first(); $this['bookings'] = Bookings::where('id', $this->param('id'))->first(); $this['tickets'] = Ticket::orderBy('created_at', 'desc')->where('vendor_id', $user->vendor)->get(); $this['allocations'] = Allocation::where('vendor_id', $user->vendor)->get(); } $this['ticket'] = Ticket::make(); $this['allocation'] = Allocation::make(); return ['#list-ticket-container' => $this->renderPartial('booking/list_ticket_edit')]; } ?> ==