承接 athwari/laravel-zkteco-adms 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

athwari/laravel-zkteco-adms

Composer 安装命令:

composer require athwari/laravel-zkteco-adms

包简介

Laravel package implementing the ZKTeco ADMS protocol for biometric attendance devices.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package provides the backend ADMS protocol implementation for ZKTeco biometric devices in Laravel.

It handles device communication, attendance ingestion, user synchronization, and command dispatching. The package is intentionally tenancy-agnostic.

If you need tenant-aware behavior in Filament, use athwari/filament-zkteco-adms, which owns tenancy configuration and tenant column management.

Features

  • Device lifecycle management (registration, activity tracking, stale device eviction command)
  • ADMS protocol endpoints for cdata, registry, getrequest, devicecmd, inspect, and test
  • Attendance log parsing and persistence
  • User synchronization from device operation logs and user query responses
  • Command queueing, polling, and confirmation handling
  • Configurable model bindings via zkteco-adms.models.*
  • Optional event dispatching for device, attendance, command, and user sync flows

Installation

Install the package via Composer:

composer require athwari/laravel-zkteco-adms

Configuration

Publish the configuration file:

php artisan vendor:publish --tag="zkteco-adms-config"

Migrations are loaded automatically by the service provider.

Main configuration areas in config/zkteco-adms.php:

  • table_prefix: prefix used for all ZKTeco tables
  • routes: endpoint prefix, middleware, and optional domain
  • device: registration and limits configuration
  • response: handshake defaults
  • models: model class overrides for device, user, attendance log, command, and event
  • events: per-event dispatch toggles
  • enable_inspect: enables the inspect endpoint

Usage

ADMS Endpoints

By default, routes are mounted under /iclock (configurable via zkteco-adms.routes.prefix):

  • GET/POST /iclock/cdata
  • GET/POST /iclock/registry
  • GET /iclock/getrequest
  • POST /iclock/devicecmd
  • GET /iclock/inspect (when enabled)
  • GET/POST /iclock/test

Services

Core services are container singletons:

  • Athwari\LaravelZktecoAdms\Services\DeviceManager
  • Athwari\LaravelZktecoAdms\Services\CommandManager
  • Athwari\LaravelZktecoAdms\Services\AttendanceParser
  • Athwari\LaravelZktecoAdms\Services\DeviceCommandBuilder

Models

Default models:

  • Athwari\LaravelZktecoAdms\Models\ZktecoDevice
  • Athwari\LaravelZktecoAdms\Models\ZktecoUser
  • Athwari\LaravelZktecoAdms\Models\ZktecoAttendanceLog
  • Athwari\LaravelZktecoAdms\Models\ZktecoDeviceCommand
  • Athwari\LaravelZktecoAdms\Models\ZktecoDeviceEvent

You can override these through config('zkteco-adms.models.*') in your application.

Facade

The package ships with an auto-discovered facade alias: ZktecoAdms

use ZktecoAdms;

$device = ZktecoAdms::registerDevice('SN123456');

if (ZktecoAdms::deviceExists('SN123456')) {
    ZktecoAdms::setDeviceTimezone('SN123456', 'Asia/Riyadh');
}

$commandId = ZktecoAdms::sendCheckCommand('SN123456');

ZktecoAdms::commandBuilder()->reboot('SN123456');

If you prefer explicit imports:

use Athwari\LaravelZktecoAdms\Facades\ZktecoAdms;

Testing

Run the test suite with:

composer test

Additional useful scripts:

composer test-coverage
composer analyse
composer format

Tenancy Boundary

This package no longer owns multi-tenancy configuration.

  • Core package responsibility: protocol and domain logic
  • Filament plugin responsibility: tenant ownership, tenant columns, and tenant-scoped UI queries

Contributing

Please see CONTRIBUTING for details.

Security

Please review SECURITY if you discover a vulnerability in this package.

Credits

License

The MIT License (MIT). Please see LICENSE.md for more information.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固