public static function periode($strtime) { $day = date('d', $strtime); $month = date('n', $strtime); $year = date('Y', $strtime); return Myfungsi::bulan($month) . ' ' . $year; }
public function get_index() { $date = Input::get('date', false); $pool_id = Auth::user()->pool_id; if (!$date) { $date = date('Y-m-d'); } $timestamp = strtotime($date); $this->data['month'] = Myfungsi::bulan(date('n', strtotime($date))); return View::make('themes.layouts.dashboard', $this->data); }
public function get_detail($id = false, $id_group = false) { if (!$id || !$id_group) { return false; } $group = Schedulegroup::find($id_group); $interval = Schedulemaster::find($group->schedule_master_id); $dayofmonth = array(); $optionsmonth = array(); $optionsyears = array(); for ($i = 1; $i <= $interval->bravo_interval + 1; $i++) { $dayofmonth[$i] = $i; } for ($month = 1; $month <= 12; $month++) { $optionsmonth[$month] = Myfungsi::bulan($month); } for ($year = date('Y'); $year < date('Y') + 3; $year++) { $optionsyears[$year] = $year; } $this->data['fleets'] = Schedulefleetgroup::where('schedule_group_id', '=', $id_group)->get(); $this->data['group'] = Schedulegroup::find($id_group); $this->data['dayofmonth'] = $dayofmonth; $this->data['months'] = $optionsmonth; $this->data['years'] = $optionsyears; $this->data['shifts'] = Koki::to_dropdown(Shift::all(), 'id', 'shift'); $this->data['fleetinfo'] = Fleet::join('ksos', 'fleets.id', '=', 'ksos.fleet_id')->where('ksos.fleet_id', '=', $id)->where('ksos.actived', '=', 1)->where('fleets.pool_id', '=', Auth::user()->pool_id)->first(); //->get(array('fleets.*','ksos.bravo_driver_id', 'ksos.charlie_driver_id')); return View::make('themes.modul.' . $this->views . '.setholiday', $this->data); }