skyraptor/laravel-fullcalendar
Laravel helper for FullCalendar.io
18,223
4
| Install | |
|---|---|
composer require skyraptor/laravel-fullcalendar |
|
| Latest Version: | 1.6.0 |
| PHP: | ^7.3 | ^8.0 |
| License: | MIT |
| Last Updated: | Jul 29, 2024 |
| Links: | GitHub · Packagist |
Maintainer: bumbummen99
Laravel FullCalendar | WIP
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(),
]);
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
637,827,751
9,703
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
413,412,504
609
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
394,964,158
4,660
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.6.0 | ^7.3 | | ^7.0 | | MIT | |
| 1.5.0 | ^7.3 | | ^7.0 | | MIT | |
| 1.4.3 | ^7.2 | ^6.0| | MIT | |
| 1.4.2 | ^7.2 | ^6.0| | MIT | |
| 1.4.1 | ^7.2 | ^6.0| | MIT | |
| 1.4.0 | ^7.2 | ^6.0| | MIT | |
| v1.3.0 | >=5.4.0 | ~5.0 | MIT | |
| v1.2.5 | >=5.4.0 | ~5.0 | MIT | |
| v1.2.4 | >=5.4.0 | ~5.0 | MIT | |
| v1.2.3 | >=5.4.0 | ~5.0 | MIT | |
| v1.2.2 | >=5.4.0 | ~5.0 | MIT | |
| v1.2.1 | >=5.4.0 | ~5.0 | MIT | |
| v1.2.0 | >=5.4.0 | ~5.0 | MIT | |
| v1.1.1 | >=5.4.0 | ~5.0 | ||
| v1.1.0 | >=5.4.0 | ~5.0 | ||
| v1.0.0 | >=5.4.0 | ~5.0 | ||
| v0.2.2 | >=5.4.0 | 4.2.* | ||
| v0.2.1 | >=5.4.0 | 4.2.* | ||
| v0.2.0 | >=5.4.0 | 4.2.* | ||
| v0.1.0 | >=5.4.0 | 4.2.* |