public function showAdminEmployeeTimesheet() { $employeeId = Session::get('userEmployeeId'); //$employeeId = Auth::user()->employee_id; $currentDate = date('Y-m-d'); $employee = new Employee(); $employeeInfo = $employee->getEmployeeInfoById($employeeId); $workShift = new Workshift(); $employeeWorkShift = $workShift->getWorkShiftByEmployeeId($employeeId); $timesheet = new Timesheet(); $employeeTimesheet = $timesheet->getAllRows($employeeId); $getTimesheetById = $timesheet->getTimesheetById($employeeId, $currentDate); $timesheetPerMonth = $timesheet->getTimesheetPerMonth($employeeId, Session::get('dayDateArr')); $schedule = new Schedule(); $checkSchedule = $schedule->checkSchedule($employeeId, $currentDate); $getSchedule = $schedule->getSchedule($employeeId, $currentDate); //Admin view return View::make('employees.admin.clocking', ['employeeInfo' => $employeeInfo, 'employeeWorkShift' => $employeeWorkShift, 'employeeTimesheet' => $employeeTimesheet, 'getTimesheetById' => $getTimesheetById, 'timesheetPerMonth' => $timesheetPerMonth]); }