{"id":18850176,"url":"https://github.com/edofre/laravel-fullcalendar","last_synced_at":"2025-04-14T09:21:24.679Z","repository":{"id":56975149,"uuid":"74131832","full_name":"Edofre/laravel-fullcalendar","owner":"Edofre","description":"Laravel Fullcalendar component","archived":false,"fork":false,"pushed_at":"2018-01-03T20:37:43.000Z","size":108,"stargazers_count":57,"open_issues_count":1,"forks_count":24,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-12T19:51:37.813Z","etag":null,"topics":["calendar","fullcalendar","laravel","laravel-fullcalendar"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Edofre.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGE.MD","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-18T13:27:12.000Z","updated_at":"2025-03-01T17:58:01.000Z","dependencies_parsed_at":"2022-08-21T11:50:29.162Z","dependency_job_id":null,"html_url":"https://github.com/Edofre/laravel-fullcalendar","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edofre%2Flaravel-fullcalendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edofre%2Flaravel-fullcalendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edofre%2Flaravel-fullcalendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edofre%2Flaravel-fullcalendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Edofre","download_url":"https://codeload.github.com/Edofre/laravel-fullcalendar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852186,"owners_count":21171843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calendar","fullcalendar","laravel","laravel-fullcalendar"],"created_at":"2024-11-08T03:28:14.576Z","updated_at":"2025-04-14T09:21:24.653Z","avatar_url":"https://github.com/Edofre.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel fullcalendar component\n\n[![Latest Stable Version](https://poser.pugx.org/edofre/laravel-fullcalendar/v/stable)](https://packagist.org/packages/edofre/laravel-fullcalendar)\n[![Total Downloads](https://poser.pugx.org/edofre/laravel-fullcalendar/downloads)](https://packagist.org/packages/edofre/laravel-fullcalendar)\n[![Latest Unstable Version](https://poser.pugx.org/edofre/laravel-fullcalendar/v/unstable)](https://packagist.org/packages/edofre/laravel-fullcalendar)\n[![License](https://poser.pugx.org/edofre/laravel-fullcalendar/license)](https://packagist.org/packages/edofre/laravel-fullcalendar)\n[![composer.lock](https://poser.pugx.org/edofre/laravel-fullcalendar/composerlock)](https://packagist.org/packages/edofre/laravel-fullcalendar)\n[![Build Status](https://travis-ci.org/Edofre/laravel-fullcalendar.svg?branch=master)](https://travis-ci.org/Edofre/laravel-fullcalendar)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Edofre/laravel-fullcalendar/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Edofre/laravel-fullcalendar/?branch=master)\n\n## Installation\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nTo install, either run\n\n```\n$ php composer.phar require edofre/laravel-fullcalendar\n```\n\nor add\n\n```\n\"edofre/laravel-fullcalendar\": \"V1.2.4\"\n```\n\nto the ```require``` section of your `composer.json` file.\n\n### Note \nThe fxp/composer-asset plugin is required for this package to install properly.\nThis plugin enables you to download bower packages through composer.\n\nYou can install it using this command:\n```\ncomposer global require \"fxp/composer-asset-plugin:^1.4.0”\n```\n\nThis will add the fxp composer-asset-plugin and your composer will be able to find and download the required bower-asset/fullcalendar package.\nYou can find more info on this page: [https://packagist.org/packages/fxp/composer-asset-plugin](https://packagist.org/packages/fxp/composer-asset-plugin).\n\n## Configuration\n\nAdd the ServiceProvider to your config/app.php\n```php\n'providers' =\u003e [\n        ...\n        Edofre\\Fullcalendar\\FullcalendarServiceProvider::class,\n    ],\n```\n\nAnd add the facade\n```php\n'aliases' =\u003e [\n        ...\n        'Fullcalendar' =\u003e Edofre\\Fullcalendar\\Facades\\Fullcalendar::class,\n    ],\n```\n\nPublish assets and configuration files\n```\nphp artisan vendor:publish --tag=config\nphp artisan vendor:publish --tag=fullcalendar\n```\n\n### Manually loading script files\nBy setting the include_scripts option in the config/.env file to false the scripts will not be included when generating the calendar.\nIf you want to manually include the scripts you can call the following static function in your header/footer/etc.\n```\n    \\Edofre\\Fullcalendar\\Fullcalendar::renderScriptFiles();\n```\n\n### Example\nBelow is an example of a controller action configuring the calendar\n```php\n    public function index()\n    {\n        // Generate a new fullcalendar instance\n        $calendar = new \\Edofre\\Fullcalendar\\Fullcalendar();\n\n        // You can manually add the objects as an array\n        $events = $this-\u003egetEvents();\n        $calendar-\u003esetEvents($events);\n        // Or you can add a route and return the events using an ajax requests that returns the events as json\n        $calendar-\u003esetEvents(route('fullcalendar-ajax-events'));\n\n        // Set options\n        $calendar-\u003esetOptions([\n            'locale'      =\u003e 'nl',\n            'weekNumbers' =\u003e true,\n            'selectable'  =\u003e true,\n            'defaultView' =\u003e 'agendaWeek',\n            // Add the callbacks\n            'eventClick' =\u003e new \\Edofre\\Fullcalendar\\JsExpression(\"\n                function(event, jsEvent, view) {\n                    console.log(event);\n                }\n            \"),\n            'viewRender' =\u003e new \\Edofre\\Fullcalendar\\JsExpression(\"\n                function( view, element ) {\n                    console.log(\\\"View \\\"+view.name+\\\" rendered\\\");\n                }\n            \"),\n        ]);\n\n        // Check out the documentation for all the options and callbacks.\n        // https://fullcalendar.io/docs/\n\n        return view('fullcalendar.index', [\n            'calendar' =\u003e $calendar,\n        ]);\n    }\n\n    /**\n     * @param Request $request\n     * @return string\n     */\n    public function ajaxEvents(Request $request)\n    {\n        // start and end dates will be sent automatically by fullcalendar, they can be obtained using:\n        // $request-\u003eget('start') \u0026 $request-\u003eget('end')\n        $events = $this-\u003egetEvents();\n        return json_encode($events);\n    }\n\n    /**\n     * @return array\n     */\n    private function getEvents()\n    {\n        $events = [];\n        $events[] = new \\Edofre\\Fullcalendar\\Event([\n            'id'     =\u003e 0,\n            'title'  =\u003e 'Rest',\n            'allDay' =\u003e true,\n            'start'  =\u003e Carbon::create(2016, 11, 20),\n            'end'    =\u003e Carbon::create(2016, 11, 20),\n        ]);\n\n        $events[] = new \\Edofre\\Fullcalendar\\Event([\n            'id'    =\u003e 1,\n            'title' =\u003e 'Appointment #' . rand(1, 999),\n            'start' =\u003e Carbon::create(2016, 11, 15, 13),\n            'end'   =\u003e Carbon::create(2016, 11, 15, 13)-\u003eaddHour(2),\n        ]);\n\n        $events[] = new \\Edofre\\Fullcalendar\\Event([\n            'id'               =\u003e 2,\n            'title'            =\u003e 'Appointment #' . rand(1, 999),\n            'editable'         =\u003e true,\n            'startEditable'    =\u003e true,\n            'durationEditable' =\u003e true,\n            'start'            =\u003e Carbon::create(2016, 11, 16, 10),\n            'end'              =\u003e Carbon::create(2016, 11, 16, 13),\n        ]);\n\n        $events[] = new \\Edofre\\Fullcalendar\\Event([\n            'id'               =\u003e 3,\n            'title'            =\u003e 'Appointment #' . rand(1, 999),\n            'editable'         =\u003e true,\n            'startEditable'    =\u003e true,\n            'durationEditable' =\u003e true,\n            'start'            =\u003e Carbon::create(2016, 11, 14, 9),\n            'end'              =\u003e Carbon::create(2016, 11, 14, 10),\n            'backgroundColor'  =\u003e 'black',\n            'borderColor'      =\u003e 'red',\n            'textColor'        =\u003e 'green',\n        ]);\n        return $events;\n    }\n```\n\n\nYou can then render the calendar by generating the HMTL and scripts\n```php\n    {!! $calendar-\u003egenerate() !!}\n```\n\n\n## Tests\n\nRun the tests by executing the following command:\n```\ncomposer test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedofre%2Flaravel-fullcalendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedofre%2Flaravel-fullcalendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedofre%2Flaravel-fullcalendar/lists"}