phpinnacle/comments

Polymorphic record discussions for Laravel Livewire and Filament.

Maintainers

Package info

github.com/phpinnacle/comments

pkg:composer/phpinnacle/comments

Transparency log

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-09-01 10:02 UTC

This package is auto-updated.

Last update: 2026-09-01 15:41:24 UTC


README

Latest Version on Packagist

Comments provides polymorphic discussion threads for Eloquent records. It includes a Livewire thread, Filament action and infolist entry, comment policy, rich-text toolbar configuration and automatic pruning support.

Features

  • Comments attached to any Eloquent model through a morph relation.
  • Livewire list and creation form.
  • Filament CommentsAction modal and CommentsEntry infolist component.
  • Author association using a configurable user model.
  • Policy-backed access and configurable editor toolbar.
  • Configurable database connection and retention period.

Installation

composer require phpinnacle/comments
php artisan vendor:publish --tag="phpinnacle-comments-migrations"
php artisan migrate

Publish configuration or views only when customization is required:

php artisan vendor:publish --tag="phpinnacle-comments-config"
php artisan vendor:publish --tag="phpinnacle-comments-views"

Set user.model to the authenticatable model used by the application. prune controls retention in days, while toolbar controls the enabled formatting buttons.

Filament usage

use PHPinnacle\Comments\Actions\CommentsAction;
use PHPinnacle\Comments\Infolists\CommentsEntry;

CommentsAction::make();

CommentsEntry::make('comments');

Authorization is delegated to CommentPolicy. Register or override the policy when the application's access rules differ. If pruning is desired, schedule Laravel's model:prune command.

Testing

composer test

Changelog and license

See CHANGELOG. Released under the MIT License.