Appearance
Your Data
Scheduler Pro works with your existing tables. Defaults are starts_at, ends_at and title. Point it elsewhere when yours differ:
php
$scheduler
->model(Shift::class)
->startAttribute('begins_at')
->endAttribute('finishes_at')
->titleAttribute('name')
->resources(Vehicle::class)
->resourceAttribute('vehicle_id')
->resourceTitleAttribute('plate')
->modifyQueryUsing(fn (Builder $query) => $query->where('cancelled', false));| Method | Purpose |
|---|---|
model() | The event model. |
startAttribute() / endAttribute() | Datetime columns. Defaults starts_at, ends_at. |
titleAttribute() | Defaults title. |
resources() | Rows: a model class, a closure returning models, or any iterable. |
resourceAttribute() | The foreign key. Inferred from the relationship when possible. |
resourceTitleAttribute() | Row label. Rows are ordered by it. |
modifyQueryUsing() | Scope the events query. |
Presentation
php
$scheduler
->eventColor(fn (Appointment $record) => $record->treatment)
->eventTitle(fn (Appointment $record) => $record->patient->name)
->eventDescription(fn (Appointment $record) => $record->status->getLabel())
->resourceDescription(fn (Staff $resource) => $resource->role)
->resourceGroup(fn (Staff $resource) => $resource->team)
->resourceColor(fn (Staff $resource) => $resource->color)
->views([SchedulerView::TimelineDay, SchedulerView::TimelineWeek, SchedulerView::Agenda])
->defaultView(SchedulerView::TimelineDay)
->visibleHours('07:00', '20:00')
->firstDayOfWeek(Carbon::MONDAY)
->slotMinutes(15)
->defaultEventMinutes(30)
->height('70vh');eventColor() accepts any HasColor enum, a Filament or Tailwind colour name, or a hex value. resourceGroup() creates collapsible row groups, like Dentists, Hygienists and Rooms in the demo.