Download the PHP package basecodeoy/livewire-calendar without Composer
On this page you can find all versions of the php package basecodeoy/livewire-calendar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download basecodeoy/livewire-calendar
More information about basecodeoy/livewire-calendar
Files in basecodeoy/livewire-calendar
Package livewire-calendar
Short Description A package to build calendars with Laravel Livewire.
License MIT
Homepage https://github.com/basecodeoy/livewire-calendar
Informations about the package livewire-calendar
About Livewire Calendar
This project was created by, and is maintained by Brian Faust, and is a package to build calendars with Laravel Livewire. Be sure to browse through the security policy.
Installation
Note This package requires PHP 8.2 or later, and it supports Laravel 10 or later.
To get the latest version, simply require the project using Composer:
Usage
Note Please review the contents of our test suite for detailed usage examples.
In order to use this component, you must create a new Livewire component that extends the AbstractCalendar
class. This class provides the basic functionality for the calendar, and you can override the methods to customize the calendar to your needs. The events()
function is the only required method, and it must return a Collection
of Event
objects.
If you want to load events from the database with Eloquent you will need to create a new Event
object for each record. You can use the map()
method to create a new Collection
of Event
objects.
The most basic way to render this Livewire component on a page is using the <livewire:
tag syntax:
Alternatively you can use the @livewire
blade directive:
Drag and Drop
If you want to enable drag and drop functionality you will need to include the following JavaScript in your application. This will allow you to drag and drop events to different days.
Note We recommend to put this into your resources/js/app.js file.
Troubleshooting
If you are having trouble getting the calendar to render, you should make sure that your tailwind.config.js
file is configured correctly. You can use the following example as a starting point:
All versions of livewire-calendar with dependencies
illuminate/contracts Version ^10.0
livewire/livewire Version ^2.12
nesbot/carbon Version ^2.66
basecodeoy/laravel-package-powerpack Version ^0.0.1