skyraptor/laravel-fullcalendar
Composer 安装命令:
composer require skyraptor/laravel-fullcalendar
包简介
Laravel helper for FullCalendar.io
README 文档
README
This is an fork of the 1.3 version of the laravel-fullcalendar package by Shawn Tunney to provide support for Laravel 7+.
Installation
The package can be installed with composer:
composer require skyraptor/laravel-fullcalendar
Also you will have to include the JS and CSS of FullCalendar, you can do so by using the official CDN:
<link href="https://unpkg.com/@fullcalendar/core/main.min.css" rel="stylesheet"> <link href="https://unpkg.com/@fullcalendar/daygrid/main.min.css" rel="stylesheet"> <link href="https://unpkg.com/@fullcalendar/bootstrap@4.4.0/main.min.css" rel="stylesheet"> <script src="https://unpkg.com/@fullcalendar/core@4.4.0/main.min.js"></script> <script src="https://unpkg.com/@fullcalendar/daygrid/main.min.js"></script> <script src="https://unpkg.com/@fullcalendar/bootstrap/main.min.js"></script> <!-- FullCalendar initialization script --> {!! $calendar->script() !!}
Further CDN addresses can be found on https://fullcalendar.io/docs/plugin-index
The HTML can be displayed as so:
{!! $calendar->calendar() !!}
Usage
The package can be used as shown:
$events = []; $events[] = Calendar::event( 'Event One', //event title false, //full day event? '2015-02-11T0800', //start time (you can also use Carbon instead of DateTime) '2015-02-12T0800', //end time (you can also use Carbon instead of DateTime) 0 //optionally, you can specify an event ID ); $events[] = Calendar::event( "Valentine's Day", //event title true, //full day event? new \DateTime('2015-02-14'), //start time (you can also use Carbon instead of DateTime) new \DateTime('2015-02-14'), //end time (you can also use Carbon instead of DateTime) 'stringEventId' //optionally, you can specify an event ID ); /* Add an array with addEvents */ Calendar::addEvents($events); /* Set fullcalendar options */ Calendar::setOptions([ 'plugins' => [ 'dayGrid', 'bootstrapPlugin' ], 'themeSystem' => 'bootstrap', ]); return view('page.events', [ ... 'calendar' => Calendar::getFacadeRoot(), ]);
skyraptor/laravel-fullcalendar 适用场景与选型建议
skyraptor/laravel-fullcalendar 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17.88k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2020 年 03 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 skyraptor/laravel-fullcalendar 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 skyraptor/laravel-fullcalendar 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 17.88k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 7
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-14