Go to file
manukminasyan e173d9b4dd refactor: replace custom textarea with Filament RichEditor and built-in mentions
Replace the custom Alpine.js textarea + mention system with Filament v5's
built-in RichEditor component and MentionProvider. This fixes Alpine scope
errors (showMentions/mentionResults not defined) that occurred during
Livewire DOM morphing inside Filament slide-over modals.

- Add InteractsWithForms + HasForms to Comments and CommentItem components
- Define commentForm(), editForm(), replyForm() with RichEditor + mentions
- Add CommentsConfig::makeMentionProvider() shared helper
- Update MentionParser to extract mention IDs from RichEditor HTML format
- Update Comment::renderBodyWithMentions() to use RichContentRenderer
- Remove all custom Alpine.js mention code from blade templates
- Backward compatible with existing plain text comments
2026-03-27 18:43:07 +04:00

Comments

Comments System

A full-featured commenting system for Filament panels with threaded replies, @mentions, emoji reactions, and real-time updates.

Latest Version Total Downloads PHP 8.2+ Laravel 12+ Tests

Features

  • Threaded Replies - Nested comment threads with configurable depth limits
  • @Mentions - Autocomplete user mentions with customizable resolver
  • Emoji Reactions - 6 built-in reactions with configurable emoji sets
  • File Attachments - Image and document uploads with validation
  • Notifications & Subscriptions - Database and mail notifications with auto-subscribe
  • 3 Filament Integrations - Slide-over action, table action, and infolist entry

Requirements

  • PHP: 8.2+
  • Laravel: 12+
  • Livewire: 3.5+ / 4.x
  • Filament: 4.x / 5.x

Installation

composer require relaticle/comments

Publish and run migrations:

php artisan vendor:publish --tag=comments-migrations
php artisan migrate

Usage

Set Up Your Models

Add the commenting traits to your models:

use Relaticle\Comments\Concerns\HasComments;
use Relaticle\Comments\Contracts\Commentable;

class Project extends Model implements Commentable
{
    use HasComments;
}

Add the commenter trait to your User model:

use Relaticle\Comments\Concerns\CanComment;
use Relaticle\Comments\Contracts\Commentator;

class User extends Authenticatable implements Commentator
{
    use CanComment;
}

Register the Filament Plugin

use Relaticle\Comments\CommentsPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            CommentsPlugin::make(),
        ]);
}

Add Comments to Your Resources

Use the slide-over action on view/edit pages:

use Relaticle\Comments\Filament\Actions\CommentsAction;

protected function getHeaderActions(): array
{
    return [
        CommentsAction::make(),
    ];
}

Or add as a table action:

use Relaticle\Comments\Filament\Actions\CommentsTableAction;

public static function table(Table $table): Table
{
    return $table
        ->actions([
            CommentsTableAction::make(),
        ]);
}

Or embed in an infolist:

use Relaticle\Comments\Filament\Infolists\Components\CommentsEntry;

public static function infolist(Infolist $infolist): Infolist
{
    return $infolist->schema([
        CommentsEntry::make('comments'),
    ]);
}

View Complete Documentation ->

Our Ecosystem

FilaForms

Visual form builder for all your public-facing forms. Learn more ->

Custom Fields

Let users add custom fields to any model without code changes. Learn more ->

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License. See LICENSE for details.

Description
A Filament comments package with threaded replies, mentions, reactions, file attachments, notifications, and real-time updates
Readme 3 MiB
Languages
PHP 90.7%
Blade 9.1%
CSS 0.2%