Download the PHP package marshmallow/filament-fullcalendar without Composer

On this page you can find all versions of the php package marshmallow/filament-fullcalendar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-fullcalendar

The Most Popular JavaScript Calendar as a Filament Widget 💛

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Features


Support Filament

filament-logo


Table of contents


Installation

You can install the package via composer:

You can publish the config file with:


Usage

Since the package does not automatically add the FullCalendarWidget widget to your Filament panel, you are free to extend the widget and customise it yourself.

  1. First, create a Filament Widget:

This will create a new App\Filament\Widgets\CalendarWidget class in your project.


  1. Your newly created widget should extends the Saade\FilamentFullCalendar\Widgets\FullCalendarWidget class of this package

Warning

Don't forget to remove protected static string $view from the generated class!

Warning

You should use getViewData to display initial data, and fetchEvents to fetch new events while paginating the calendar.

Both methods should retun an array of EventObject.


Configuration

This is the contents of the default config file.

You can use any property that FullCalendar uses on its root object. Please refer to: FullCalendar Docs to see the available options. It supports most of them.


Styling

If you're building a custom Filament theme, you need one more step to make the calendar theme match your custom theme.

Add this line to your resources/css/filament.css file (or whatever file you're using).

the final contents of this file should look simmilar to this


Listening for events

The only event-related events supported right now are: EventClick and EventDrop

They're commented out by default so livewire does not spam requests without they being used. You are free to paste them in your CalendarWidget class. See: FiresEvents

Since v1.0.0 we use onEventClick to open the edit modal. If you need to hook up into this event, be sure to call the original method using parent::onEventClick() to keep the modal opening as it should.


Creating and Editing events with modals.

Since v1.0.0 you can create and edit events using a modal.

To customise the modal, override the following properties in your widget:

The process of saving and editing the event is up to you, since this plugin does not rely on a Model to save the calendar events.

Creating Events

Events can be created in two ways.

This will open the Create Event modal.

When the create form gets submitted, it will call the createEvent function on your widget. Be sure to add the snippet below to your calendar class.

If the default form does not fullfills your needs, you can override the getCreateEventFormSchema and use it like a normal Filament form.

You can override the getCreateEventModalTitle() method to change the modal title to a custom one:

You can override the getCreateEventModalSubmitButtonLabel() and getCreateEventModalCloseButtonLabel() methods to change the modal button labels to custom labels:


Editing Events

Events can be edited by clicking on an event on the calendar.

This will open the Edit Event modal.

When the edit form gets submitted, it will call the editEvent function on your widget. Be sure to add the snippet below to your calendar class.

If the default form does not fullfills your needs, you can override the getEditEventFormSchema and use it like a normal Filament form.

You can override the getEditEventModalTitle() method to change the modal title to a custom one:

You can override the getEditEventModalSubmitButtonLabel() and getEditEventModalCloseButtonLabel() methods to change the modal button labels to custom labels:


Authorizing actions

If you want to authorize the view action, you can override the default authorization methods that comes with this package.

If you want to authorize the edit or create action, you can override the default authorization methods that comes with this package.

If you want to disable all actions or keep the calendar as it was before v1.0.0, you can return false for all the methods above, or use the convenient concern CantManageEvents. It will disable all calendar modals.


Listening for cancelled modal

If you want to know when a modal has been cancelled, you can add for the following Livewire events to your widgets $listener array:

Refreshing calendar events

If you want to refresh the calendar events, you can call $this->refreshEvents() inside your widget class. This will call getViewData() and re-render the events on the calendar.


Filtering events based on the calendar view

If you want to filter your events based on the days that are currently shown in the calendar, you can implement the fetchInfo() method from the CanFetchEvents trait. Add the following code to your calendar widget:

you can filter events based on the timespan $fetchInfo['start'] and $fetchInfo['end'].

example:


Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-fullcalendar with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
filament/filament Version ^2.0
illuminate/contracts Version ^9.0|^10.0
spatie/laravel-package-tools Version ^1.11
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package marshmallow/filament-fullcalendar contains the following files

Loading the files please wait ....