CreateEvent, EditEvent), which fits CRUD-heavy admin workflows.dayGridMonth, timeGridWeek, and timeGridDay via Filament’s Widget class. Minimal PHP configuration (e.g., getCalendarOptions()).Actions system to tie events to Eloquent models (e.g., Appointment, Event). Requires defining a CalendarEvent model with start_time, end_time, and color fields.filtersForm() (e.g., dropdowns for status, service_type). Can integrate with Filament’s existing query filters or custom logic.getEvents() method to fetch data from a database or API. Performance may degrade with large event datasets (e.g., >10K events).Widget class may limit flexibility for non-standard use cases (e.g., custom event rendering).CalendarEvent model align with the package’s expected schema (e.g., start_time, end_time, color)? If not, how will you map custom fields?getEvents()?Widget or Resource classes. Ideal for admin panels with CRUD workflows.composer require theabhishekin/filament-calendar
CalendarEvent model extends Filament\Models\Concerns\HasTenant (if using multi-tenancy) and includes:
protected $casts = [
'start_time' => datetime,
'end_time' => datetime,
'color' => 'string',
];
namespace App\Filament\Widgets;
use TheAbhishekIN\FilamentCalendar\Widgets\Calendar;
use App\Models\CalendarEvent;
class EventCalendar extends Calendar {
protected static ?string $navigationIcon = 'heroicon-o-calendar';
protected static string $navigationGroup = 'Tools';
public function getEvents(): array {
return CalendarEvent::query()
->where('user_id', auth()->id())
->get()
->map(fn ($event) => [
'id' => $event->id,
'title' => $event->title,
'start' => $event->start_time,
'end' => $event->end_time,
'color' => $event->color,
]);
}
}
filtersForm() to add custom logic:
public function filtersForm(): array {
return [
Forms\Components\Select::make('status')
->options(['pending', 'confirmed', 'cancelled'])
->live(onChange: true),
];
}
public function getEventActions(): array {
return [
Actions\EditAction::make(),
Actions\DeleteAction::make(),
];
}
resources/css/filament/calendar.css for custom colors/layouts.protected static bool $enableDarkMode = false;.CalendarEvent model and basic widget.CreateEvent/EditEvent modals via Filament Actions.status, service_type).getEvents() queries (e.g., pagination, indexing).How can I help you explore Laravel packages today?