Skip to content

Comments

This page is generated from public package documentation in capell-4/packages and the package manifest checked into the source repository.

FieldValue
Composer packagecapell-app/comments
Package slugcomments
Product groupCapell Engagement
Tierpremium
Bundlecomments
Runtime contextsadmin, frontend
Capell version^4.0
Source repositorycapell-app/packages
Source pathpackages/comments
Docs sourcepackages/comments/docs
Manifestcapell.json

Comments adds moderated, configurable, cache-safe threaded discussion surfaces to registered Capell content.

  • Package: capell-app/comments
  • Namespace: Capell\Comments\
  • Product group: Capell Engagement
  • Tier: premium
  • Surfaces: admin, frontend
  • Service providers: Capell\Comments\Providers\CommentsServiceProvider, Capell\Comments\Providers\AdminServiceProvider, Capell\Comments\Providers\FrontendServiceProvider
  • Install command: capell-comments:install
  • Required tables: comment_authors, comments, comment_tokens, comment_moderation_events
  • Site owners can add public discussion to pages or package content without building a custom moderation system.
  • Editors get a moderation inbox, author records, status transitions, and dashboard widgets instead of managing comments from raw tables.
  • Developers register commentable content types once and let the package resolve public-safe thread data for the frontend.
  • Operators can keep cached pages safe because the public thread is loaded separately with private, no-store response headers.
  • Comment authors, comments, verification tokens, and moderation event records.
  • Configurable identity, publication, verification, throttling, spam, and notification settings in config/capell-comments.php.
  • Public capell-comments.thread and email verification routes under the configured route_prefix.
  • CommentThreadComponent for post-load public thread rendering.
  • Admin resources for comment and author moderation.
  • CommentStatsWidget and LatestCommentsWidget for admin visibility.
  • ResolvePublicCommentableThreadAction and BuildPublicThreadAction for converting registered content into public thread DTOs.
  • Public thread reads return nothing when comments are disabled, publication is disabled, or the commentable model is not publicly visible.
  • Public DTOs include public IDs, sanitized body text, author display names, timestamps, depth, reply counts, and children.
  • Public DTOs do not expose moderation status, model IDs, commentable IDs, author email, visitor hashes, tokens, or admin URLs.
  • The thread endpoint is designed for dynamic frontend loading rather than embedding moderation state in cached page HTML.
AreaPath
Configconfig/capell-comments.php
Routesroutes/web.php
Installsrc/Console/Commands/InstallCommentsCommand.php, src/Actions/InstallCommentsPackageAction.php
Public threadsrc/Livewire/CommentThreadComponent.php, src/Http/Controllers/RenderCommentThreadController.php
Verificationsrc/Actions/RequestCommentEmailVerificationAction.php, src/Actions/VerifyCommentAuthorEmailAction.php
Moderationsrc/Actions/TransitionCommentStatusAction.php, src/Filament/Pages/CommentModerationInbox.php
Settingssrc/Settings/CommentSettings.php, src/Filament/Settings/CommentSettingsSchema.php
Data objectssrc/Data/PublicCommentData.php, src/Data/PublicCommentableThreadData.php, src/Data/CreateCommentData.php
Modelssrc/Models/Comment.php, src/Models/CommentAuthor.php, src/Models/CommentToken.php
  • Adds package migrations and settings migration.
  • Adds frontend routes under capell/comments by default.
  • Adds admin moderation resources and dashboard widgets.
  • Does not make every model commentable automatically; commentable types are resolved through the package registry and defaults.

Run package tests from the repository root:

Terminal window
vendor/bin/pest packages/comments/tests --configuration=phpunit.xml
  • Keep public thread data anonymous-safe and moderation-free.
  • Keep registration logic in package providers or Actions rather than public Blade.
  • Add focused docs when new commentable registries, notification flows, or moderation transitions become public extension points.