Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Comments For Laravel Laravel Package

roundly-consulting/comments-for-laravel

A drop-in comments system for Laravel. Add threaded, polymorphic comments to any Eloquent model with migrations, models, and a simple API, no third-party service required. Configurable and lightweight, it's ready to integrate into your app in minutes.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API contract ownership: The new comments.resources.author config key lets product/engineering teams define the exact author payload exposed to clients—id/type by default, plus name, avatar, or other fields via a custom JsonResource. This is a build-vs-configure decision: use the package’s extension point instead of forking comment serialization.
  • Privacy and surface-area control: CommentResource now renders author.type as the author class basename (User) rather than the stored actor_type (e.g. App\Models\User). This reduces accidental leakage of internal namespace/class structure to API consumers and supports security-reviewed API contracts.
  • Roadmap and versioning: The author.type change is contract-affecting for existing API clients even though it ships in a minor release. PMs should treat it as a client-communication and contract-testing item, and decide whether to adopt now, pin the prior version, or schedule a coordinated API change.
  • Feature reuse vs custom build: For Laravel products needing polymorphic comments (activity feeds, support threads, audit notes, social interactions), the package now covers a common customization need—author presentation—without custom resource code. That strengthens a buy/adopt decision over building comment serialization in-house.
  • Configuration safety: An invalid comments.resources.author value throws an InvalidConfigurationException naming the key. This supports operational readiness: misconfiguration fails clearly rather than silently producing inconsistent API output.

When to Consider This Package

Consider it when:

  • You are building a Laravel application with Eloquent models and need comment data exposed through JSON API resources.
  • Comments have polymorphic authors and you need a consistent {id, type} author envelope, with the option to add name, avatar, or other fields through a custom JsonResource.
  • You want a configurable serialization boundary rather than hard-coding author shape in controllers or ad hoc API resources.
  • You can tolerate a minor-version upgrade with a contract-affecting change to author.type, or you can pin versions and migrate clients deliberately.
  • You value clear configuration validation over silent fallback behavior.

Look elsewhere when:

  • You need a complete commenting product—UI, moderation, spam filtering, notifications, threading, or permissions—rather than an API serialization package.
  • You are not on Laravel/PHP or do not use Laravel’s JsonResource conventions.
  • You require a fully stable public API contract with no migration work across minor releases; in that case, pin the current version and plan the author.type change explicitly.
  • Your API clients depend on receiving the full author class name or a morph alias in author.type and cannot be updated; the new default basename behavior will require a custom resource or a client migration.
  • You need author payloads that cannot be expressed by a JsonResource receiving the author model.

How to Pitch It (Stakeholders)

For executives: This release makes comment author data configurable and safer to expose. Instead of leaking internal class names like App\Models\User to every API client, the package now returns a clean type (User) and lets us add customer-facing fields such as names or avatars through configuration. That reduces custom code, improves API hygiene, and keeps a common commenting capability in the package rather than in our backlog. The main caveat is a small API contract change that needs coordinated client communication.

For engineering: Version 1.2.0 adds CommentAuthorResource and the comments.resources.author config key, defaulting to CommentAuthorResource::class. Swap in your own JsonResource to control the author payload; invalid values throw InvalidConfigurationException with the offending key. The behavioral change is that CommentResource.author.type is now the author class basename, not the stored actor_type. Update contract tests and API consumer expectations accordingly, and use the config key rather than forking the resource.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin