canDo('employee.attendance.approve')) { return true; } return false; } /** * Determine if the given user can approve the given attendance. * * @param Authenticatable $user * * @return bool */ public function submit(Authenticatable $user, Attendance $attendance) { if ($user->canDo('employee.attendance.submit')) { return true; } return false; } /** * Determine if the given user can approve the given attendance. * * @param Authenticatable $user * * @return bool */ public function publish(Authenticatable $user, Attendance $attendance) { if ($user->canDo('employee.attendance.publish')) { return true; } return false; } /** * Determine if the given user can approve the given attendance. * * @param Authenticatable $user * * @return bool */ public function unpublish(Authenticatable $user, Attendance $attendance) { if ($user->canDo('employee.attendance.unpublish')) { return true; } return false; } /** * Determine if the given user can approve the given attendance. * * @param Authenticatable $user * * @return bool */ public function archive(Authenticatable $user, Attendance $attendance) { if ($user->canDo('employee.attendance.archive')) { return true; } return false; } /** * Determine if the given user can approve the given attendance. * * @param Authenticatable $user * * @return bool */ public function unarchive(Authenticatable $user, Attendance $attendance) { if ($user->canDo('employee.attendance.unarchive')) { return true; } return false; } /** * Determine if the given user can approve the given attendance. * * @param Authenticatable $user * * @return bool */ public function reject(Authenticatable $user, Attendance $attendance) { if ($user->canDo('employee.attendance.reject')) { return true; } return false; } }