modularavel/commentable

A Laravel Blade Livewire package for threaded comments with replies

v1.0.0 2025-10-02 01:10 UTC

This package is auto-updated.

Last update: 2025-10-02 01:28:18 UTC


README

A Laravel Blade Livewire package for threaded comments with nested replies.

Screenshots

Comment Thread

Comment Form

Nested Replies

Threaded Comments with Nested Replies and Real-time Updates with Livewire Threads

Installation

composer require modularavel/commentable

Publish Configuration & Assets

php artisan vendor:publish --tag=comments-config
php artisan vendor:publish --tag=comments-migrations
php artisan vendor:publish --tag=comments-views

Run Migrations

php artisan migrate

Usage

In Your Blade View

<livewire:comment-thread :commentable="$post" />

Make Your Model Commentable

use LaravelComments\Threads\Traits\Commentable;

class Post extends Model
{
    use Commentable;
}

Configuration

Edit config/comments.php to customize:

  • User model
  • Pagination settings
  • Moderation options
  • Display preferences

Features

  • Nested comment replies
  • Real-time updates with Livewire
  • User authentication integration
  • Edit and delete comments
  • Customizable views
  • Pagination support
  • Markdown support (optional)

License

MIT

Test

composer test