modularavel / commentable
A Laravel Blade Livewire package for threaded comments with replies
v1.0.0
2025-10-02 01:10 UTC
Requires
- php: ^8.1
- illuminate/support: ^10.0|^11.0
- livewire/livewire: ^3.0
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
README
A Laravel Blade Livewire package for threaded comments with nested replies.
Screenshots
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