kennebula / calendar
此包将提供日历 JSON
dev-main
2023-06-28 10:22 UTC
This package is auto-updated.
Last update: 2024-09-28 13:12:07 UTC
README
日历 JSON 和查看,时间表即将推出
first
在您的 composer.json 中复制以下内容
"repositories": [
{
"type": "vcs",
"url": "https://github.com/hnineiphyu-128/KenCalander"
}
]
然后,更新后的 composer.json 文件应如下所示
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
// 这里是
"repositories": [
{
"type": "vcs",
"url": "https://github.com/hnineiphyu-128/KenCalander"
}
],
// ... 以及其他内容
}
现在,Composer 也会检查这个仓库中的任何可安装包。执行以下命令来安装包
composer require kennebula/calendar
如您所见,包已成功安装。现在,打开 config/app.php 文件并滚动到 providers 数组。在该数组中,应该有一个用于包服务提供者的部分。在该部分中添加以下代码行
/*
- 包服务提供者...
*/
Kennebula\Calendar\CalendarServiceProvider::class,
最后,现在,打开 Kernel.php 文件并滚动到 routeMiddleware。在该数组中,应该有一个用于包服务类的部分。在该部分中添加以下代码行
/*
* 应用程序的路线中间件。
*
* 这些中间件可以分配到组或单独使用。
*
*/
'CalendarService' => \Kennebula\Calendar\CalendarService::class,
结论
感谢您花时间阅读这篇文章。希望您喜欢它
使用教程
调用日历 JSON
\$your_year_month='2023-06';
CalendarService::getcalendarjson($your_year_month);
调用日历查看
getcalendar/your_year_month
您的年月格式必须是 'yyyy-mm'。