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

Laravel Comment Laravel Package

mll-lab/laravel-comment

Add comments to any Laravel Eloquent model with a reusable commentable trait, migrations, and a ready-made Comment model. Supports polymorphic associations and straightforward integration into existing apps.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for engagement features. Any roadmap item that implies user-generated discussion — comments on posts, tickets, documents, listings, courses, assets — can be scoped against a single Composer require instead of a bespoke persistence layer. The package supplies the polymorphic comments() relationship, the Comment model, author linkage, and parent/child threading out of the box.
  • Feature scope calls on "threaded" vs. "flat". Because nested replies are native (parent comment references) rather than an add-on, PMs can commit to threaded conversations in a spec without commissioning a data-model design. Conversely, if the product only ever needs flat comments, the package still fits — the reply capability is optional, not mandatory.
  • Multi-surface reuse. The polymorphic trait means one comment system can serve several model types at once. That supports a platform decision — "one unified discussion primitive across products" — rather than N per-feature comment tables, and it keeps analytics and moderation tooling pointed at one table.
  • Roadmap sequencing and platform floors. The 2.0.0 constraint set (PHP 8.2+, Laravel 10–13) is a hard gate. If the product roadmap includes a Laravel 9 or PHP 8.1 service, this package cannot be part of that plan. This is a useful forcing function for deciding whether that service gets modernised or excluded from the feature.
  • Deferring UI and moderation decisions. The package is explicitly persistence-and-relationship glue. That means the PM still owns the expensive product questions — comment composer UX, edit windows, soft-delete policy, spam/abuse handling, notification fan-out, permissions. Scoping this package does not scope those; it only removes the schema work from the critical path.
  • Use cases this maps to cleanly: internal review threads on records, activity notes on CRM entities, Q&A under knowledge-base articles, annotation on uploaded deliverables, per-item discussion in a ticketing or approval workflow.

When to Consider This Package

Consider it when:

  • The service is already on Laravel 11 or 12 with PHP 8.2+. This is the sweet spot — modern enough that the constraint set costs nothing, mature enough that the package's support is proven.
  • You need comments attached to more than one model, or expect to. That is the trait's whole value proposition, and it is wasted on a single hard-coded target.
  • You are comfortable owning the presentation and policy layer yourself — routes, controllers, views, authorisation, moderation, notifications. The package is not a drop-in comments UI.
  • Your team writes conventional Laravel and can read a migration and a trait. Ramp-up is genuinely low for that profile.
  • You want the schema decision made for you — one comments table, standard foreign keys, one less architecture debate.

Look elsewhere — or build — when:

  • You are on Laravel 9 or below, or PHP 8.0/8.1. This is not a trade-off; it is blocked.
  • You are on Laravel 13. Support is advertised, but it is an evaluation track until validated in your own environment.
  • You need out-of-the-box UI, moderation queues, reactions, mentions, or rich text. None of that ships here. If those are launch requirements, the package covers a small fraction of the real scope and the "buy" saving shrinks accordingly.
  • You need a fully managed, SLA-backed vendor component. This is a small open-source package (6 stars, single-vendor) with no stated support window. That is fine for internal tooling; it is thin for a revenue-critical, customer-facing surface.
  • Upgrade cadence is a concern. The 2.0.0 notes raise the PHP and Laravel floors without enumerating breaking changes. That means every major carries an unpriced migration. If your team cannot absorb a recurring upgrade slot per major, the total cost of ownership is higher than the Composer require suggests.
  • You need scale characteristics you can point at. Nothing here speaks to throughput or query behaviour under load. For high-volume comment surfaces, demand load testing before committing.

How to Pitch It (Stakeholders)

For executives — one paragraph. This is a small, MIT-licensed Laravel package that provides the database structure and relationships for a comments feature, attachable to any record in our application. It converts a multi-sprint "design and build a comment system" workstream into a dependency install plus focused work on the user-facing experience, which is where the actual product value sits. It is low-cost and low-commitment — no licence fee, no vendor lock-in, removable in an afternoon. The caveats are equally simple: it requires a modern runtime, it is maintained by a small team without a stated support guarantee, and it is only the plumbing — moderation, notifications, and the interface remain our work.

For engineering — the honest version. Polymorphic comments() trait plus a Comment model with author and parent references. One Composer require, one publishable migration. Constraints are php ^8.2 and laravel ^10|^11|^12|^13. Two things to flag: the 2.0.0 release notes list only additions and raised floors with no breaking-change list for a major version, which is a documentation gap we should treat as risk rather than reassurance; and Laravel 13 support should be verified in our own CI before we depend on it. Recommended path is a spike branch on Laravel 11/12, diff published config and assets against any prior version, run the existing suite, then pin. Budget a recurring upgrade slot per major rather than a one-off.

For product and design — what you are actually getting. The data model for threads, replies, and authorship. Not the composer, not the reply UX, not the edit/delete policy, not moderation, not notifications, not permissions. Those remain in scope and should stay in the estimate. The win is that the schema debate is closed and the feature starts at the interface.

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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource