aa-engineering/laravel-workday-manager
Composer 安装命令:
composer require aa-engineering/laravel-workday-manager
包简介
A Laravel package for managing workday modifications - holidays moved to workdays and vice versa
README 文档
README
A Laravel package for managing workday modifications - holidays moved to workdays and vice versa.
Features
- Track days when weekends/holidays become working days
- Track days when working days become holidays
- Simple API for checking workday status
- Laravel auto-discovery support
- Comprehensive test coverage
Installation
Install the package via Composer:
composer require aa-engineering/laravel-workday-manager
Publish and run the migrations:
php artisan vendor:publish --tag="workday-manager-migrations"
php artisan migrate
Optionally, publish the config file:
php artisan vendor:publish --tag="workday-manager-config"
Usage
Creating Moved Workdays
use AAEngineering\WorkdayManager\Models\MovedWorkday; use Carbon\Carbon; // A Saturday that becomes a working day MovedWorkday::create([ 'day' => '2025-12-14', 'type' => 'workday', ]); // A Monday that becomes a holiday MovedWorkday::create([ 'day' => '2025-12-24', 'type' => 'holiday', ]);
Checking Workday Status
use AAEngineering\WorkdayManager\WorkdayManager; use Carbon\Carbon; $date = Carbon::parse('2025-12-14'); // Check if a date has been changed to a holiday if (WorkdayManager::isChangedToHoliday($date)) { // This working day is now a holiday } // Check if a date has been changed to a workday if (WorkdayManager::isChangedToWorkday($date)) { // This weekend/holiday is now a working day } // Get the modification type (null, 'holiday', or 'workday') $type = WorkdayManager::getModificationType($date);
Using the Factory
use AAEngineering\WorkdayManager\Models\MovedWorkday; // Create a random moved workday $movedWorkday = MovedWorkday::factory()->create(); // Create a weekend moved to workday $workday = MovedWorkday::factory()->workday()->create(); // Create a workday moved to holiday $holiday = MovedWorkday::factory()->holiday()->create();
Configuration
The package configuration file config/workday-manager.php allows you to customize:
load_migrations: Whether to automatically load package migrations (default:true)
Testing
Run the package tests:
composer test
Laravel Compatibility
- Laravel 11.x
- Laravel 12.x
PHP Compatibility
- PHP 8.2
- PHP 8.3
- PHP 8.4
License
The MIT License (MIT). Please see License File for more information.
aa-engineering/laravel-workday-manager 适用场景与选型建议
aa-engineering/laravel-workday-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 310 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 10 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「calendar」 「laravel」 「holiday」 「business-days」 「workday」 「working-days」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 aa-engineering/laravel-workday-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 aa-engineering/laravel-workday-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 aa-engineering/laravel-workday-manager 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A modern PHP library for generating iCalendar v2.0 events
A powerful event calendar Tool for Laravel's Nova 5.
Check for holidays - localeaware
This TYPO3 distribution provides a sample website using bootstrap and the extensions pizpalue and container_elements. The distribution tailors Swiss market featuring German as default language and additional translations to French, English and Finnish.
A basic wrapper for citco/carbon which returns business days between two given dates.
Your Package Description here
统计信息
- 总下载量: 310
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 29
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-12