Skip to content

Lifecycle Events

FilamentCraft fires four lifecycle events you can listen to:

EventFired when
FilamentCraft\Events\SiteCreatedA new Site row is persisted (factory or manual).
FilamentCraft\Events\TemplateDraftSavedThe editor's Save button writes a new draft revision.
FilamentCraft\Events\TemplatePublishedA revision is promoted to published_revision_id.
FilamentCraft\Events\SectionAddedA section is inserted via the Add-section modal.
php
Event::listen(TemplatePublished::class, function (TemplatePublished $event): void {
    Log::info("Published {$event->template->name} (revision {$event->revision->id})");
});

Proprietary — distributed via Anystack.