All Projects → Edofre → laravel-fullcalendar-scheduler

Edofre / laravel-fullcalendar-scheduler

Licence: MIT License
Laravel Fullcalendar scheduler component

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to laravel-fullcalendar-scheduler

astro
自用天文算法,公历农历转换、八大行星位置、日出日落月出月落时间、节气物候时间等
Stars: ✭ 33 (+57.14%)
Mutual labels:  calendar
WeekToDoWeb
WeekToDo is a free minimalist weekly planner app focused on privacy. Schedule your tasks and projects with to do lists and a calendar. Available for Windows, Mac, Linux or online.
Stars: ✭ 48 (+128.57%)
Mutual labels:  calendar
calendar-view-plugin
Jenkins Calendar View Plugin: Shows past and future builds in a calendar view
Stars: ✭ 17 (-19.05%)
Mutual labels:  calendar
components
Easily develop emails with email-ready components.
Stars: ✭ 18 (-14.29%)
Mutual labels:  calendar
Photoshop-Javascript-Tools
Utility scripts to speed up daily photoshopping and automate annoying tasks
Stars: ✭ 35 (+66.67%)
Mutual labels:  calendar
finql
A quantitative finance toolbox
Stars: ✭ 21 (+0%)
Mutual labels:  calendar
bhitte-patro
Google Calendar for Nepali Date
Stars: ✭ 25 (+19.05%)
Mutual labels:  calendar
KosherCocoa
My Objective-C port of KosherJava. KosherCocoa enables you to perform sunrise-based and sunset-based calculations for Jewish prayer and calendar.
Stars: ✭ 49 (+133.33%)
Mutual labels:  calendar
wepy-com-calendar
一个基于wepy的日历组件,内置多套皮肤,可启用打卡功能
Stars: ✭ 33 (+57.14%)
Mutual labels:  calendar
yuanful-ui
(微信小程序插件) yuanful-ui是一套可添加到微信小程序内直接使用的免费功能插件,无需重复开发,为用户提供更丰富的服务。
Stars: ✭ 30 (+42.86%)
Mutual labels:  calendar
vuejs3-datepicker
vue 3 datepicker. supports disabling, highlighting of dates and programmatic access of date.
Stars: ✭ 23 (+9.52%)
Mutual labels:  calendar
google-calendar-api
Demo Project for Google Calendar API Using Spring Boot Rest API with OAuth2
Stars: ✭ 25 (+19.05%)
Mutual labels:  calendar
WLAppleCalendar
Make AppleCalendar using JTAppleCalendar library.🎉
Stars: ✭ 34 (+61.9%)
Mutual labels:  calendar
ios-permissions-service
An easy way to do permissions requests & handling automatically.
Stars: ✭ 25 (+19.05%)
Mutual labels:  calendar
github-now
Automatically generate your GitHub user profile page
Stars: ✭ 140 (+566.67%)
Mutual labels:  calendar
Klendario
A Swift wrapper over the EventKit framework
Stars: ✭ 44 (+109.52%)
Mutual labels:  calendar
react-native-infinite-calendar
WIP: React native port of react-infinite-calendar
Stars: ✭ 43 (+104.76%)
Mutual labels:  calendar
docker-sogo
Run sogo in a docker container.
Stars: ✭ 20 (-4.76%)
Mutual labels:  calendar
OmniList
开源的时间管理App,基于Material Design设计
Stars: ✭ 61 (+190.48%)
Mutual labels:  calendar
weather-calendar-feed
Display yr.no weather (supports the entire Earth) forecasts with highly customizable Event titles in your Google Calendar, Android phone, iPhone, Outlook or other iCalendar app
Stars: ✭ 16 (-23.81%)
Mutual labels:  calendar

Laravel fullcalendar scheduler component

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock Build Status

Installation

The preferred way to install this extension is through composer.

To install, either run

$ php composer.phar require edofre/laravel-fullcalendar-scheduler "v1.2.3"

or add

"edofre/laravel-fullcalendar-scheduler": "v1.2.3"

to the require section of your composer.json file.

Note

The fxp/composer-asset plugin is required for this package to install properly. This plugin enables you to download bower packages through composer.

You can install it using this command:

composer global require "fxp/composer-asset-plugin:^1.3.0”

This will add the fxp composer-asset-plugin and your composer will be able to find and download the required bower-asset/fullcalendar-scheduler package. You can find more info on this page: https://packagist.org/packages/fxp/composer-asset-plugin.

Configuration

Add the ServiceProvider to your config/app.php

'providers' => [
        ...
        Edofre\FullcalendarScheduler\FullcalendarSchedulerServiceProvider::class,
    ],

And add the facade

'aliases' => [
        ...
        'Fullcalendar' => Edofre\FullcalendarScheduler\Facades\FullcalendarScheduler::class,
    ],

Publish assets and configuration files

php artisan vendor:publish --tag=config
php artisan vendor:publish --tag=fullcalendar-scheduler

Manually loading script files

By setting the include_scripts option in the config/.env file to false the scripts will not be included when generating the calendar. If you want to manually include the scripts you can call the following static function in your header/footer/etc.

    \Edofre\FullcalendarScheduler\FullcalendarScheduler::renderScriptFiles();

Example

Use the following as your controller action

/**
 * @return \Illuminate\Http\Response
 */
public function index()
{
    // Generate a new fullcalendar instance
    $calendar = new \Edofre\FullcalendarScheduler\FullcalendarScheduler();

    // Set events and resources, commented lines shows how to add them via ajax
    // $calendar->setEvents(route('fullcalendar-scheduler-ajax-events'));
    $calendar->setEvents([
        ['id' => '1', 'resourceId' => 'b', 'start' => '2016-05-07T02:00:00', 'end' => '2016-05-07T07:00:00', 'title' => 'event 1'],
        ['id' => '2', 'resourceId' => 'c', 'start' => '2016-05-07T05:00:00', 'end' => '2016-05-07T22:00:00', 'title' => 'event 2'],
        ['id' => '3', 'resourceId' => 'd', 'start' => '2016-05-06', 'end' => '2016-05-08', 'title' => 'event 3'],
        ['id' => '4', 'resourceId' => 'e', 'start' => '2016-05-07T03:00:00', 'end' => '2016-05-07T08:00:00', 'title' => 'event 4'],
        ['id' => '5', 'resourceId' => 'f', 'start' => '2016-05-07T00:30:00', 'end' => '2016-05-07T02:30:00', 'title' => 'event 5'],
    ]);
    
    // $calendar->setResources(route('fullcalendar-scheduler-ajax-resources'));
    $calendar->setResources([
        ['id' => 'a', 'title' => 'Auditorium A'],
        ['id' => 'b', 'title' => 'Auditorium B', 'eventColor' => 'green'],
		['id' => 'c', 'title' => 'Auditorium C', 'eventColor' => 'orange'],
        [
            'id'       => 'd',
            'title'    => 'Auditorium D',
            'children' => [
                ['id' => 'd1', 'title' => 'Room D1'],
                ['id' => 'd2', 'title' => 'Room D2'],
            ],
        ],
        ['id' => 'e', 'title' => 'Auditorium E'],
        ['id' => 'f', 'title' => 'Auditorium F', 'eventColor' => 'red'],
        ['id' => 'g', 'title' => 'Auditorium G'],
        ['id' => 'h', 'title' => 'Auditorium H'],
        ['id' => 'i', 'title' => 'Auditorium I'],
        ['id' => 'j', 'title' => 'Auditorium J'],
        ['id' => 'k', 'title' => 'Auditorium K'],
        ['id' => 'l', 'title' => 'Auditorium L'],
        ['id' => 'm', 'title' => 'Auditorium M'],
        ['id' => 'n', 'title' => 'Auditorium N'],
        ['id' => 'o', 'title' => 'Auditorium O'],
        ['id' => 'p', 'title' => 'Auditorium P'],
        ['id' => 'q', 'title' => 'Auditorium Q'],
        ['id' => 'r', 'title' => 'Auditorium R'],
        ['id' => 's', 'title' => 'Auditorium S'],
        ['id' => 't', 'title' => 'Auditorium T'],
        ['id' => 'u', 'title' => 'Auditorium U'],
        ['id' => 'v', 'title' => 'Auditorium V'],
        ['id' => 'w', 'title' => 'Auditorium W'],
        ['id' => 'x', 'title' => 'Auditorium X'],
        ['id' => 'y', 'title' => 'Auditorium Y'],
        ['id' => 'z', 'title' => 'Auditorium Z'],
    ]);

    // Set options
    $calendar->setOptions([
        'now'               => '2016-05-07',
        'editable'          => true, // enable draggable events
        'aspectRatio'       => 1.8,
        'scrollTime'        => '00:00', // undo default 6am scrollTime
        'defaultView'       => 'timelineDay',
        'views'             => [
            'timelineThreeDays' => [
                'type'     => 'timeline',
                'duration' => [
                    'days' => 3,
                ],
            ],
        ],
        'resourceLabelText' => 'Rooms',
        'eventClick' => new \Edofre\FullcalendarScheduler\JsExpression("
                    function(event, jsEvent, view) {
                        console.log(event);
                    }
                "),
                'viewRender' => new \Edofre\FullcalendarScheduler\JsExpression("
                    function( view, element ) {
                        console.log(\"View \"+view.name+\" rendered\");
                    }
                "),
    ]);

    return view('fullcalendar-scheduler.index', [
        'calendar' => $calendar,
    ]);
}

And then add the following to your view

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

Tests

Run the tests by executing the following command:

composer test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].