chengkangzai/laravel-office-holidays
最新稳定版本:v0.0.1
Composer 安装命令:
composer require chengkangzai/laravel-office-holidays
包简介
A Laravel Package that list out holiday that Scraped from https://www.officeholidays.com/countries
README 文档
README
This package is a Laravel Package that list out office's Holiday that Scraped from https://www.officeholidays.com/. The underlying package that is used to scrape the data is using Saloon.
Installation
You can install the package via composer:
composer require chengkangzai/laravel-office-holidays
You can publish the config file with:
php artisan vendor:publish --tag="laravel-office-holidays-config"
This is the contents of the published config file:
return [ 'cache' => [ 'driver' => 'file', 'duration' => 60 * 60 * 24 * 7 // 1 week ] ];
Usage
Get All Holidays for a specific country with its year
$laravelOfficeHolidays = new CCK\LaravelOfficeHolidays(); app(LaravelOfficeHolidays::class)->getAllHolidays('malaysia', 2024)
Get All Holidays for a specific state of the country with its year
$laravelOfficeHolidays = new CCK\LaravelOfficeHolidays(); app(LaravelOfficeHolidays::class)->getHolidaysByState('malaysia', 2024, 'johor')
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
Alternatives
MalaysiaHoliday -> This project was inspired by Hafiq, his package MalaysiaHoliday is a great alternative for Malaysian Holidays, this package does not limit the usage for laravel.
Spatie Holidays -> This package is a great alternative for holidays from spatie, it is more robust and does not rely on scraping data from the internet.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 44
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-05-12