LaravelPackages.net
Acme Inc.
Toggle sidebar
ko/laravel-fullcalendar

Laravel helper for FullCalendar.io

263
0
0.0.9
About ko/laravel-fullcalendar

ko/laravel-fullcalendar is a Laravel package for laravel helper for fullcalendar.io. It currently has 0 GitHub stars and 263 downloads on Packagist (latest version 0.0.9). Install it with composer require ko/laravel-fullcalendar. Discover more Laravel packages by ko or browse all Laravel packages to compare alternatives.

Last updated

Build Status Total Downloads Latest Stable Version License

ko-laravel-fullcalendar

This package is a composer installable helper for working with fullcalendar.io in a laravel app.

Usage

Building an Event

$event = new \KO\Fullcalendar\Event();
$event->build(['id'=>'asdf', 'title' => 'test', 'start' => '20-04-2018']);

Adding an Event to an EventCollection

$events = new \KO\Fullcalendar\EventCollection();
$events->push( $event );

Custom options

$options = new \KO\Fullcalendar\Options([
    'header' => [
        'right' => 'prev,next today',
        'center' => 'title',
        'left' => 'month,agendaWeek,agendaDay',
    ],
    'eventLimit' => true,
]);

Instantiate a new Calendar

$calendar = new \KO\Fullcalendar\Calendar();
$calendar->addEvents( $events );
$calendar->setOptions( $options );

Draw the calendar

In your blade, add the following where you would like the calendar to be drawn.

  {!! $calendar->html() !!}

CDN

This package has a helper method for building the appropriate style and javascript assets from a CDN. Just add the following to your html to load the appropriate resources.

Fullcalendar css

{!! $calendar->cdn('fullcalendar', 'css', '3.9.0') !!}

Fullcalendar js

{!! $calendar->cdn('fullcalendar', 'js', '3.9.0') !!}

Moment js

{!! $calendar->cdn('moment', 'js', '2.22.1') !!}

Comments