1. Go to this page and download the library: Download lsv-eu/livewire-calendar library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lsv-eu / livewire-calendar example snippets
public function events() : Collection
{
// must return a Laravel collection
}
public function onDayClick($year, $month, $day)
{
// This event is triggered when a day is clicked
// You will be given the $year, $month and $day for that day
}
public function onEventClick($eventId)
{
// This event is triggered when an event card is clicked
// You will be given the event id that was clicked
}
public function onEventDropped($eventId, $year, $month, $day)
{
// This event will fire when an event is dragged and dropped into another calendar day
// You will get the event id, year, month and day where it was dragged to
}