PHPackages                             ahidtechnologies/zkteco-biometric - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ahidtechnologies/zkteco-biometric

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ahidtechnologies/zkteco-biometric
=================================

Laravel package for ZKTeco biometric device integration with attendance management

1.0.2(6mo ago)016MITPHPPHP ^8.0

Since Oct 17Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/ahid-technologies/zkteco-biometric)[ Packagist](https://packagist.org/packages/ahidtechnologies/zkteco-biometric)[ RSS](/packages/ahidtechnologies-zkteco-biometric/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

ZKTeco Biometric Integration for Laravel
========================================

[](#zkteco-biometric-integration-for-laravel)

A comprehensive Laravel package for integrating ZKTeco biometric devices with attendance management systems.

Features
--------

[](#features)

- **Device Management**: Add, configure, and monitor ZKTeco biometric devices
- **Real-time Communication**: Handle device handshakes, commands, and data synchronization
- **Attendance Tracking**: Automatic attendance logging from biometric data
- **Employee Management**: Sync employee fingerprints, cards, and photos with devices
- **Multi-timezone Support**: Proper timezone handling for global deployments
- **Command System**: Send commands to devices (create user, delete user, etc.)
- **Comprehensive Logging**: Detailed logs for debugging and monitoring

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- Laravel 10.0 or higher
- MySQL/PostgreSQL database

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require ahidtechnologies/zkteco-biometric
```

Publish and run the migrations:

```
php artisan vendor:publish --provider="AhidTechnologies\ZKTecoBiometric\ZKTecoBiometricServiceProvider" --tag="migrations"
php artisan migrate
```

Optionally, publish the configuration file:

```
php artisan vendor:publish --provider="AhidTechnologies\ZKTecoBiometric\ZKTecoBiometricServiceProvider" --tag="config"
```

Configuration
-------------

[](#configuration)

The package will automatically register the required routes. The default configuration includes:

- API endpoints for device communication
- Timezone handling
- Attendance processing settings

Usage
-----

[](#usage)

### Device Setup

[](#device-setup)

1. **Add a Device**:

```
use AhidTechnologies\ZKTecoBiometric\Models\BiometricDevice;

$device = BiometricDevice::create([
    'device_name' => 'Main Entrance',
    'serial_number' => 'BJHQ203160001',
    'device_ip' => '192.168.1.100'
]);
```

2. **Configure Device IP**: Point your ZKTeco device to your Laravel application's URL with the following endpoints:
    - **Handshake**: `GET /iclock/cdata`
    - **Attendance Data**: `POST /iclock/cdata`
    - **Commands**: `GET /iclock/getrequest`
    - **Command Results**: `POST /iclock/devicecmd`

### Employee Management

[](#employee-management)

```
use AhidTechnologies\ZKTecoBiometric\Models\BiometricEmployee;

// Create biometric employee
$employee = BiometricEmployee::create([
    'biometric_employee_id' => '001',
    'user_id' => $user->id, // Your application's user ID
    'has_fingerprint' => true,
    'card_number' => '1234567890'
]);
```

### Sending Commands to Device

[](#sending-commands-to-device)

```
use AhidTechnologies\ZKTecoBiometric\Models\BiometricCommand;

// Create user on device
BiometricCommand::create([
    'device_serial_number' => 'BJHQ203160001',
    'command_id' => 'CREATEUSER-001',
    'command' => "C:CREATEUSER-001:DATA USER PIN=001\tName=John Doe\n",
    'employee_id' => '001',
    'user_id' => $user->id,
    'status' => 'pending'
]);
```

### Attendance Processing

[](#attendance-processing)

The package automatically processes attendance data when received from devices. You can also manually process attendance:

```
use AhidTechnologies\ZKTecoBiometric\Models\BiometricAttendance;

// Get attendance records
$attendances = BiometricAttendance::where('user_id', $userId)
    ->whereDate('timestamp', today())
    ->get();
```

API Endpoints
-------------

[](#api-endpoints)

The package registers the following API routes:

- `GET /iclock/cdata` - Device handshake
- `POST /iclock/cdata` - Attendance data submission
- `GET /iclock/getrequest` - Command polling
- `POST /iclock/devicecmd` - Command execution results

Models
------

[](#models)

### BiometricDevice

[](#biometricdevice)

Manages ZKTeco device information and status.

### BiometricEmployee

[](#biometricemployee)

Links application users with biometric device employee IDs.

### BiometricAttendance

[](#biometricattendance)

Stores attendance records from biometric devices.

### BiometricCommand

[](#biometriccommand)

Manages commands sent to devices.

Events
------

[](#events)

The package dispatches events for key operations:

- Device online/offline status changes
- Attendance records created
- Command execution results

Timezone Support
----------------

[](#timezone-support)

The package properly handles timezone conversions between device time and application time, ensuring accurate attendance logging across different timezones.

Testing
-------

[](#testing)

Run the package tests:

```
vendor/bin/phpunit
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

Support
-------

[](#support)

For support, please contact [Ahid Technologies](https://ahidtechnologies.com) or create an issue in the repository.

Authors
-------

[](#authors)

- **Ahid Technologies** -

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance69

Regular maintenance activity

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Total

3

Last Release

182d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d535f3365f6f467b2e7615ebb7e35ba3256c78f8aac6e3847cfcff179564e7e?d=identicon)[ahid-technologies](/maintainers/ahid-technologies)

---

Top Contributors

[![ahid-technologies](https://avatars.githubusercontent.com/u/147272059?v=4)](https://github.com/ahid-technologies "ahid-technologies (3 commits)")

---

Tags

laraveldeviceFingerprintzktecoattendancebiometric

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ahidtechnologies-zkteco-biometric/health.svg)

```
[![Health](https://phpackages.com/badges/ahidtechnologies-zkteco-biometric/health.svg)](https://phpackages.com/packages/ahidtechnologies-zkteco-biometric)
```

###  Alternatives

[yajra/laravel-datatables-oracle

jQuery DataTables API for Laravel

4.9k33.8M339](/packages/yajra-laravel-datatables-oracle)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[spatie/laravel-enum

Laravel Enum support

3655.4M31](/packages/spatie-laravel-enum)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
