Provider-agnostic calendar client for Laravel. Google Calendar first, extensible to Outlook, iCal, and more.
composer require conduit-ui/calendarPublish the config:
php artisan vendor:publish --tag=calendar-configSet your Google Calendar access token:
CALENDAR_DRIVER=google
GOOGLE_CALENDAR_ACCESS_TOKEN=your-tokenuse ConduitUI\Calendar\CalendarManager;
$calendar = app(CalendarManager::class);
// List today's events
$events = $calendar->driver()->listEvents(
'primary',
now()->startOfDay(),
now()->endOfDay(),
);
// Each event is a CalendarEvent DTO
foreach ($events as $event) {
echo "{$event->start->format('g:ia')}: {$event->title}";
echo $event->location ? " ({$event->location})" : '';
echo PHP_EOL;
}
// Get a specific event
$event = $calendar->driver()->getEvent('primary', 'event-id');
// List available calendars
$calendars = $calendar->driver()->listCalendars();ConduitUI\Calendar\Contracts\CalendarEvent {
string $id
string $title
?string $description
Carbon $start
Carbon $end
bool $allDay
?string $location
array $attendees // [{email, name, status}]
string $status // confirmed, tentative, cancelled
?string $htmlLink
}Implement CalendarProvider:
use ConduitUI\Calendar\Contracts\CalendarProvider;
class OutlookDriver implements CalendarProvider
{
public function listCalendars(): Collection { ... }
public function listEvents(string $calendarId, Carbon $start, Carbon $end, int $maxResults = 20): Collection { ... }
public function getEvent(string $calendarId, string $eventId): CalendarEvent { ... }
public function createEvent(string $calendarId, array $data): CalendarEvent { ... }
}Register in the CalendarManager or extend via config.
- PHP 8.2+
- Laravel 12 or 13
- Saloon 4.x
- Spatie Laravel Data 4.x
MIT