PHP code example of aienming / holiday-m
1. Go to this page and download the library: Download aienming/holiday-m 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/ */
aienming / holiday-m example snippets
$shell
$ composer laravel5.7以后会自动发现服务,可以略过此步)
$ php artisan vendor:publish --provider="Aienming/HolidayManage/HolidayServiceProvider.php"
# 迁移数据表
$ php artisan migrate
$php
use HolidayM;
HolidayM::createOrUpdate($start, $end, $params[, $id]); // 返回array
// 返回格式:
// [
// 'result' => false, // 操作是否成功
// 'error' => '该节假日和调休日冲突,不允许添加!', // 错误提示
// 'data' => obj // 成功时返回的模型
// ]