Skip to content
Available for new work
Pages in Blog

ReferencePremium

CoullWorks Blog for Laravel events reference

Every event the package dispatches, when it fires, whether it can be vetoed and what it carries.

Updated 16 November 2026Back to the package pageBuy

Every event is dispatched synchronously, so a listener runs inside the request or job that caused it. Events marked Vetoable fire before the change and can be stopped. For how to listen, see Events and contracts.

Vetoing a change#

A vetoable event implements Blockable. A listener calls block($reason) to stop the change; isBlocked() and reason() report the outcome. The BlocksChange trait supplies the three methods to every vetoable event.

  • Blockable (marker interface): The interface every vetoable event implements.
  • BlocksChange: The trait that implements it.

AI events#

AiDraftCreated#

Fired after the AI writer saves a draft post, from a new article run or a refresh.

  • Class: CoullWorks\Blog\Ai\Events\AiDraftCreated
  • Payload: Post $post, AiRun $run, string $provider
  • Dispatched from: Ai/Drafts/DraftSaver, Ai/Refresh/RefreshService

AiPromptBuilding#

Fired while a prompt is built, so a listener can add to it.

  • Class: CoullWorks\Blog\Ai\Events\AiPromptBuilding
  • Payload: string $kind
  • Dispatched from: Ai/Prompts/PromptBuilder

AiQueueItemChanged#

Fired after a bulk queue item moves from one state to another.

  • Class: CoullWorks\Blog\Ai\Events\AiQueueItemChanged
  • Payload: int $itemId, int $blogId, string $from, string $to, ?string $actor
  • Dispatched from: Ai/Queue/MoveQueueItem

AiQueueItemFinished#

Fired when a bulk queue item finishes.

  • Class: CoullWorks\Blog\Ai\Events\AiQueueItemFinished
  • Payload: int $itemId, int $blogId, int $briefId, ?int $runId, string $status
  • Dispatched from: Ai/Queue/ItemRunner

AiQueueItemStarting#

Fired before a bulk queue item starts running. Vetoable.

  • Class: CoullWorks\Blog\Ai\Events\AiQueueItemStarting
  • Payload: AiQueueItem $item
  • Dispatched from: Ai/Queue/ProcessQueue

AiRunFinished#

Fired after an AI run step finishes.

  • Class: CoullWorks\Blog\Ai\Events\AiRunFinished
  • Payload: AiRun $run, string $step
  • Dispatched from: Ai/Steps/StepRunner

AiRunStarting#

Fired before an AI run step starts. Vetoable.

  • Class: CoullWorks\Blog\Ai\Events\AiRunStarting
  • Payload: AiRun $run, string $step
  • Dispatched from: Ai/Steps/StepRunner

Analytics events#

PostViewed#

Fired when a post view is counted.

  • Class: CoullWorks\Blog\Analytics\Events\PostViewed
  • Payload: int $postId, int $blogId, ?string $locale
  • Dispatched from: Analytics/Actions/CountView

RelatedRefreshed#

Fired after the related posts of a post are recomputed.

  • Class: CoullWorks\Blog\Analytics\Events\RelatedRefreshed
  • Payload: int $postId
  • Dispatched from: Analytics/Related/RelatedPostsBuilder

Blocks events#

BlockDocumentSaving#

Fired before a block document is saved, with the blocks about to be stored. Vetoable.

  • Class: CoullWorks\Blog\Blocks\Events\BlockDocumentSaving
  • Payload: array $blocks
  • Dispatched from: Blocks/Validation/DocumentValidator

BlocksIndexed#

Fired after the media, product and link references of a translation's blocks are indexed.

  • Class: CoullWorks\Blog\Blocks\Events\BlocksIndexed
  • Payload: int $translationId, int $blogId
  • Dispatched from: Blocks/Indexing/BlockIndexer

BlocksUpgraded#

Fired after cwb:blocks:upgrade persists upgraded blocks of one type.

  • Class: CoullWorks\Blog\Blocks\Events\BlocksUpgraded
  • Payload: string $type, int $blocks, int $translations
  • Dispatched from: Blocks/Console/UpgradeCommand

Comments events#

CommentApproved#

Fired after a comment is approved, including when it is auto-approved on submission.

  • Class: CoullWorks\Blog\Comments\Events\CommentApproved
  • Payload: Comment $comment
  • Dispatched from: Comments/Actions/SubmitComment, Comments/Actions/AnnouncesStatus, Comments/Actions/ReplyAsStaff

CommentDeleted#

Fired after a comment is deleted.

  • Class: CoullWorks\Blog\Comments\Events\CommentDeleted
  • Payload: int $commentId, int $blogId, int $postId
  • Dispatched from: Comments/Actions/DeleteComment

CommentDeleting#

Fired before a comment is deleted. Vetoable.

  • Class: CoullWorks\Blog\Comments\Events\CommentDeleting
  • Payload: Comment $comment, string $actorKey
  • Dispatched from: Comments/Actions/DeleteComment

CommentEdited#

Fired after a comment's text is edited.

  • Class: CoullWorks\Blog\Comments\Events\CommentEdited
  • Payload: int $commentId, int $blogId, int $postId, string $actorKey
  • Dispatched from: Comments/Actions/EditComment

CommentEditing#

Fired before a comment's text is edited, with the new text. Vetoable.

  • Class: CoullWorks\Blog\Comments\Events\CommentEditing
  • Payload: Comment $comment, string $body, string $actorKey
  • Dispatched from: Comments/Actions/EditComment

CommentMarkedSpam#

Fired after a comment is marked as spam.

  • Class: CoullWorks\Blog\Comments\Events\CommentMarkedSpam
  • Payload: Comment $comment
  • Dispatched from: Comments/Actions/AnnouncesStatus

CommentRejected#

Fired after a comment is rejected.

  • Class: CoullWorks\Blog\Comments\Events\CommentRejected
  • Payload: Comment $comment
  • Dispatched from: Comments/Actions/AnnouncesStatus

CommentSubmitted#

Fired after a comment is stored.

  • Class: CoullWorks\Blog\Comments\Events\CommentSubmitted
  • Payload: Comment $comment
  • Dispatched from: Comments/Actions/SubmitComment

CommentSubmitting#

Fired before a submitted comment is accepted, as part of the spam checks. Vetoable.

  • Class: CoullWorks\Blog\Comments\Events\CommentSubmitting
  • Payload: Blog $blog, Post $post, CommentSubmission $submission
  • Dispatched from: Comments/Spam/SubmissionGuard

CommentsClosedChanged#

Fired after comments are closed or reopened on a post.

  • Class: CoullWorks\Blog\Comments\Events\CommentsClosedChanged
  • Payload: int $postId, int $blogId, bool $closed, string $actorKey
  • Dispatched from: Comments/Actions/SetPostCommentsClosed

ReplyNotificationsStopped#

Fired after a reader stops reply notifications for a comment.

  • Class: CoullWorks\Blog\Comments\Events\ReplyNotificationsStopped
  • Payload: int $commentId, int $blogId, int $postId
  • Dispatched from: Comments/Actions/StopReplyNotifications

StaffReplied#

Fired after a staff member replies to a comment.

  • Class: CoullWorks\Blog\Comments\Events\StaffReplied
  • Payload: Comment $reply, Comment $parent
  • Dispatched from: Comments/Actions/ReplyAsStaff

Core events#

AuthorDeleted#

Fired after an author is deleted.

  • Class: CoullWorks\Blog\Core\Events\AuthorDeleted
  • Payload: int $id, int $blogId
  • Dispatched from: Core/Actions/DeleteAuthor

AuthorDeleting#

Fired before an author is deleted. Vetoable.

  • Class: CoullWorks\Blog\Core\Events\AuthorDeleting
  • Payload: Author $author
  • Dispatched from: Core/Actions/DeleteAuthor

AuthorSaved#

Fired after an author is saved.

  • Class: CoullWorks\Blog\Core\Events\AuthorSaved
  • Payload: Author $author
  • Dispatched from: Core/Actions/SaveAuthor

AuthorSaving#

Fired before an author is saved. Vetoable.

  • Class: CoullWorks\Blog\Core\Events\AuthorSaving
  • Payload: Author $author
  • Dispatched from: Core/Actions/SaveAuthor

BlogDeleted#

Fired after a blog is deleted.

  • Class: CoullWorks\Blog\Core\Events\BlogDeleted
  • Payload: int $id, int $blogId
  • Dispatched from: Core/Actions/DeleteBlog

BlogDeleting#

Fired before a blog is deleted. Vetoable.

  • Class: CoullWorks\Blog\Core\Events\BlogDeleting
  • Payload: Blog $blog
  • Dispatched from: Core/Actions/DeleteBlog

BlogSaved#

Fired after a blog is saved.

  • Class: CoullWorks\Blog\Core\Events\BlogSaved
  • Payload: Blog $blog
  • Dispatched from: Core/Actions/SaveBlog

BlogSaving#

Fired before a blog is saved. Vetoable.

  • Class: CoullWorks\Blog\Core\Events\BlogSaving
  • Payload: Blog $blog
  • Dispatched from: Core/Actions/SaveBlog

CacheTagBumped#

Fired when a cache tag counter is bumped, which invalidates the cached output for that tag.

  • Class: CoullWorks\Blog\Core\Events\CacheTagBumped
  • Payload: string $name
  • Dispatched from: Core/CacheTags

CategoryDeleted#

Fired after a category is deleted.

  • Class: CoullWorks\Blog\Core\Events\CategoryDeleted
  • Payload: int $id, int $blogId
  • Dispatched from: Core/Actions/DeleteCategory

CategoryDeleting#

Fired before a category is deleted. Vetoable.

  • Class: CoullWorks\Blog\Core\Events\CategoryDeleting
  • Payload: Category $category
  • Dispatched from: Core/Actions/DeleteCategory

CategorySaved#

Fired after a category is saved or moved.

  • Class: CoullWorks\Blog\Core\Events\CategorySaved
  • Payload: Category $category
  • Dispatched from: Core/Actions/SaveCategory, Core/Actions/MoveCategory

CategorySaving#

Fired before a category is saved or moved. Vetoable.

  • Class: CoullWorks\Blog\Core\Events\CategorySaving
  • Payload: Category $category
  • Dispatched from: Core/Actions/SaveCategory, Core/Actions/MoveCategory

ContentAccessDenied#

Fired when the content access gate denies a viewer a post, category or listing.

  • Class: CoullWorks\Blog\Core\Events\ContentAccessDenied
  • Payload: string $kind, int $blogId, ?int $modelId, ?string $listingKind, bool $viewerSignedIn
  • Dispatched from: Core/Access/AccessGate

ImageStored#

Fired after an image and its variants are stored.

  • Class: CoullWorks\Blog\Core\Events\ImageStored
  • Payload: int $blogId, string $disk, string $path, array $variants
  • Dispatched from: Core/Actions/StoreImage

LicenceStatusChanged#

Fired when the licence status of a host changes.

  • Class: CoullWorks\Blog\Core\Events\LicenceStatusChanged
  • Payload: string $host, string $from, string $to, bool $allowed
  • Dispatched from: Core/Licence/LicenceChanges

PostDeleted#

Fired after a post is deleted, with the images it used.

  • Class: CoullWorks\Blog\Core\Events\PostDeleted
  • Payload: int $postId, int $blogId, array $images
  • Dispatched from: Core/Actions/DeletePost

PostDeleting#

Fired before a post is deleted. Vetoable.

  • Class: CoullWorks\Blog\Core\Events\PostDeleting
  • Payload: Post $post
  • Dispatched from: Core/Actions/DeletePost

PostDuplicated#

Fired after a post is duplicated, with the source and the copy.

  • Class: CoullWorks\Blog\Core\Events\PostDuplicated
  • Payload: Post $source, Post $copy
  • Dispatched from: Core/Actions/DuplicatePost

PostPublished#

Fired after a post becomes published.

  • Class: CoullWorks\Blog\Core\Events\PostPublished
  • Payload: Post $post
  • Dispatched from: Core/Actions/TransitionPost

PostPublishing#

Fired before a post is published. Vetoable.

  • Class: CoullWorks\Blog\Core\Events\PostPublishing
  • Payload: Post $post
  • Dispatched from: Core/Actions/TransitionPost

PostSaved#

Fired after a post is saved or a translation is added.

  • Class: CoullWorks\Blog\Core\Events\PostSaved
  • Payload: Post $post, ?string $locale
  • Dispatched from: Core/Actions/SetPostTemplate, Core/Actions/AddTranslation, Core/Actions/DuplicatePost

PostSaving#

Fired before a post is created, duplicated or given a translation. Vetoable.

  • Class: CoullWorks\Blog\Core\Events\PostSaving
  • Payload: Post $post, ?string $locale
  • Dispatched from: Core/Actions/AddTranslation, Core/Actions/DuplicatePost, Core/Actions/CreatePost

PostUnpublished#

Fired after a post stops being published.

  • Class: CoullWorks\Blog\Core\Events\PostUnpublished
  • Payload: Post $post
  • Dispatched from: Core/Actions/TransitionPost

RedirectCreated#

Fired after a redirect is created.

  • Class: CoullWorks\Blog\Core\Events\RedirectCreated
  • Payload: int $redirectId, int $blogId
  • Dispatched from: Core/Actions/Redirects

RedirectDeleted#

Fired after a redirect is deleted.

  • Class: CoullWorks\Blog\Core\Events\RedirectDeleted
  • Payload: int $redirectId, int $blogId, string $fromPath
  • Dispatched from: Core/Actions/Redirects, Core/Models/Redirect

RedirectRuleCreated#

Fired after a redirect rule is created.

  • Class: CoullWorks\Blog\Core\Events\RedirectRuleCreated
  • Payload: int $ruleId, int $blogId
  • Dispatched from: Core/Actions/RedirectRules

RedirectUpdated#

Fired after a redirect is updated.

  • Class: CoullWorks\Blog\Core\Events\RedirectUpdated
  • Payload: int $redirectId, int $blogId
  • Dispatched from: Core/Actions/Redirects, Core/Models/Redirect

RevisionCreated#

Fired after a revision (or autosave) of a post is recorded.

  • Class: CoullWorks\Blog\Core\Events\RevisionCreated
  • Payload: Revision $revision
  • Dispatched from: Core/Actions/RecordRevision, Core/Actions/SaveAutosave

RevisionRestored#

Fired after a revision is restored onto a translation.

  • Class: CoullWorks\Blog\Core\Events\RevisionRestored
  • Payload: Revision $revision, PostTranslation $translation, ?string $userKey
  • Dispatched from: Core/Actions/RestoreRevision

SearchIndexTouched#

Fired when the search index of a blog and locale changes.

  • Class: CoullWorks\Blog\Core\Events\SearchIndexTouched
  • Payload: int $blogId, string $locale
  • Dispatched from: Core/Search/SearchIndex

SettingChanged#

Fired after a per-blog setting changes. The old and new values are included, with redacted true when the value is secret.

  • Class: CoullWorks\Blog\Core\Events\SettingChanged
  • Payload: int $blogId, string $key, mixed $old, mixed $new, bool $redacted = false
  • Dispatched from: Core/Settings/Settings

TagDeleted#

Fired after a tag is deleted.

  • Class: CoullWorks\Blog\Core\Events\TagDeleted
  • Payload: int $id, int $blogId
  • Dispatched from: Core/Actions/DeleteTag

TagDeleting#

Fired before a tag is deleted. Vetoable.

  • Class: CoullWorks\Blog\Core\Events\TagDeleting
  • Payload: Tag $tag
  • Dispatched from: Core/Actions/DeleteTag

TagSaved#

Fired after a tag is saved.

  • Class: CoullWorks\Blog\Core\Events\TagSaved
  • Payload: Tag $tag
  • Dispatched from: Core/Actions/SaveTag

TagSaving#

Fired before a tag is saved. Vetoable.

  • Class: CoullWorks\Blog\Core\Events\TagSaving
  • Payload: Tag $tag
  • Dispatched from: Core/Actions/SaveTag

TranslationAdded#

Fired after a translation is added to a post.

  • Class: CoullWorks\Blog\Core\Events\TranslationAdded
  • Payload: int $postId, int $translationId, int $blogId, string $locale
  • Dispatched from: Core/Actions/AddTranslation

TranslationPersisted#

Fired after a post translation and its blocks are stored.

  • Class: CoullWorks\Blog\Core\Events\TranslationPersisted
  • Payload: int $postId, int $translationId, int $blogId, string $locale, array $blocks, bool $isNew
  • Dispatched from: Core/Actions/TranslationPersistence, Core/Actions/DuplicatePost

Import events#

ImportFinished#

Fired when an import job ends.

  • Class: CoullWorks\Blog\Import\Events\ImportFinished
  • Payload: int $jobId, int $blogId, string $status
  • Dispatched from: Import/ImportRunner

ImportRecordImported#

Fired after one source record is imported, with the outcome.

  • Class: CoullWorks\Blog\Import\Events\ImportRecordImported
  • Payload: int $jobId, string $entityType, string $sourceId, ?int $targetId, string $outcome
  • Dispatched from: Import/Pipeline/ImportPipeline

ImportRecordImporting#

Fired before one source record is imported, with its fields. Vetoable.

  • Class: CoullWorks\Blog\Import\Events\ImportRecordImporting
  • Payload: int $jobId, string $entityType, string $sourceId, array $fields
  • Dispatched from: Import/Pipeline/ImportPipeline

ImportStarted#

Fired when an import job starts.

  • Class: CoullWorks\Blog\Import\Events\ImportStarted
  • Payload: int $jobId, int $blogId, string $source, string $mode
  • Dispatched from: Import/ImportRunner

Available for new work

UK based · PHP · Python · JS · TS. Every first call is free.