function hasWorkShiftSchedule() { $employeeId = Session::get('userEmployeeId'); $userId = Session::get('userId'); $dayOfTheWeek = date('l'); $workShift = new Workshift(); $hasWorkShiftSchedule = $workShift->checkWorkShiftSchedule($employeeId); //$getWorkShiftByEmployeeId = $workShift->getWorkShiftByEmployeeId($employeeId); $getWorkShiftByDayOfTheWeek = $workShift->getWorkShiftByDayOfTheWeek($employeeId, $dayOfTheWeek); if ($hasWorkShiftSchedule && strtotime($getWorkShiftByDayOfTheWeek[0]->start_time) !== '') { return true; } else { return false; } }