1. Go to this page and download the library: Download hsvisus/attendance library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hsvisus / attendance example snippets
/ 处理上班打卡事件
public function handleOnduty($event)
{
ww(['OndutyEvent'], 'event_on.txt');
}
// 处理离岗事件
public function handleUndergo($event)
{
ww(['UndergoEvent'], 'event_un.txt');
}
// 处理下班打卡事件
public function handleOffduty($event)
{
ww(['OffdutyEvent'], 'event_off.txt');
}
/**
* 判断打卡时间状态(上班 ,迟到, 旷工, 下班)
* @param Model $person
* @param Model $face
* @return array
*/
public function auditClock(Model $person, Model $face):array
/**
* 获取法定节假日
* @return array
*/
public function getLegal()
/**
* 获取考勤数据
* @param string $type
* @param array $params
* @return array
*/
public function getAttendanceData($type='today', array $params=[])
/**
* 生成考勤统计表
* @param string $month
* @param int|null $company_id
* @return mixed
*/
public function generateStatistics(string $month='', int $company_id=null)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.