PHPackages                             codenzia/filament-comments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. codenzia/filament-comments

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

codenzia/filament-comments
==========================

A full-featured commenting system for Filament v4 with threaded replies, channels, polls, events, reactions, mentions, and notifications.

00PHPCI failing

Since Feb 28Pushed 2mo agoCompare

[ Source](https://github.com/Codenzia/filament-comments)[ Packagist](https://packagist.org/packages/codenzia/filament-comments)[ RSS](/packages/codenzia-filament-comments/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Filament Comments
=================

[](#filament-comments)

A full-featured commenting system for Filament v4 with threaded replies, discussion channels, polls, events, emoji reactions, @mentions, and notifications — built with Livewire 3.

Features
--------

[](#features)

- **Threaded Replies** — Nested comment threads with expand/collapse
- **Discussion Channels** — Public and private channels with member management
- **Comment Types** — Text, polls (vote), and events with RSVP
- **Emoji Reactions** — Like, love, laugh, wow, sad, angry (customizable)
- **@Mentions** — Mention users, channels, projects, and tasks with configurable triggers
- **Rich Text Editor** — Tribute.js-powered textarea with mention autocomplete
- **File Uploads** — Images (up to 5MB) and documents (up to 10MB)
- **Comment Moderation** — Approval workflow with pending comments modal
- **Notifications** — Email and database notifications for mentions
- **Dark Mode** — Full dark mode support
- **Translations** — English and Arabic included

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 11+
- Filament 4.x
- Livewire 3.x

Installation
------------

[](#installation)

Install via Composer:

```
composer require codenzia/filament-comments
```

Run the install command:

```
php artisan filament-comments:install
```

This publishes the config file and migrations. Run migrations:

```
php artisan migrate
```

Setup
-----

[](#setup)

Register the plugin in your panel provider:

```
use Codenzia\FilamentComments\FilamentCommentsPlugin;

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

Usage
-----

[](#usage)

### Adding Comments to a Model

[](#adding-comments-to-a-model)

Add the `HasComments` trait to any model:

```
use Codenzia\FilamentComments\Traits\HasComments;

class Post extends Model
{
    use HasComments;
}
```

Then use the Blade component in your views:

```

```

Or add comments programmatically:

```
$post->comment('Great article!');
$post->commentAsUser($user, 'Thanks for sharing.');
```

### Discussion Channels

[](#discussion-channels)

The plugin automatically registers two Filament pages:

- **Manage Channels** — Create, edit, and manage discussion channels
- **Discussion Page** — View and interact with channel comments

Channels appear in the sidebar navigation automatically. Configure which roles can create channels:

```
// config/codenzia-comments.php
'permissions' => [
    'create_channels_roles' => ['super_admin'],
],
```

### Comment Types

[](#comment-types)

#### Text Comments

[](#text-comments)

Standard rich text comments with mention support.

#### Poll Comments

[](#poll-comments)

Create polls with a question and multiple options. Users vote directly in the comment thread.

#### Event Comments

[](#event-comments)

Schedule events with title, date/time, and description. Users can RSVP with Going, Maybe, or Not Going.

### Mention System

[](#mention-system)

Configure mention triggers for different entity types:

TriggerEntityConfig Key`@`Users`mentionable``#`Channels`channel_mentionable``$`Projects`project_mentionable``%`Tasks`task_mentionable`### Reactions

[](#reactions)

Users can react to comments with emoji. One reaction per user per comment. Customize available reactions:

```
// config/codenzia-comments.php
'reactions' => [
    'like' => '👍',
    'love' => '❤️',
    'laugh' => '😄',
    'wow' => '😮',
    'sad' => '😢',
    'angry' => '😠',
],
```

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag="filament-comments-config"
```

Key configuration options:

```
return [
    // Models
    'comment_class' => \Codenzia\FilamentComments\Models\Comment::class,
    'user_model' => null, // defaults to auth config
    'project_model' => \App\Models\Project::class,
    'event_model' => null, // optional: persist events to a model

    // Table names
    'table_name' => 'comments',
    'reactions_table_name' => 'comments_reactions',
    'channels_table_name' => 'comment_channels',
    'channel_members_table_name' => 'comment_channel_members',

    // Navigation
    'navigation_group' => 'Channels',

    // Behavior
    'delete_replies_along_comments' => false,
    'enable_add_to_calendar' => true,

    // Editor
    'editor' => [
        'placeholder' => 'Type your comment here...',
        'height' => 100,
    ],

    // Mentions
    'mentionable' => [
        'model' => \App\Models\User::class,
        'trigger' => '@',
        'column' => [
            'id' => 'id',
            'label' => 'name',
            'value' => 'name',
            'email' => 'email',
            'avatar' => 'profile_photo_path',
        ],
        'url' => 'admin/users/{id}',
    ],
];
```

Database Schema
---------------

[](#database-schema)

The package creates four tables:

TablePurpose`comments`Main comments with polymorphic relation, threading, type, approval status`comment_channels`Discussion channels with visibility, icon, project association`comment_channel_members`Channel membership pivot table`comments_reactions`Emoji reactions per user per commentModels
------

[](#models)

### Comment

[](#comment)

- `channel()` — Belongs to a channel
- `user()` — Comment author
- `parent()` — Parent comment (for threading)
- `replies()` — Child comments
- `reactions()` — Emoji reactions

### CommentChannel

[](#commentchannel)

- `comments()` — All channel comments
- `members()` — Channel members
- `project()` — Associated project

Events
------

[](#events)

EventDispatched When`CommentAdded`New comment created`CommentDeleted`Comment removed`UserMentioned`User mentioned in a comment`EventAddedToCalendar`Event comment added to calendarTraits
------

[](#traits)

TraitPurpose`HasComments`Add to any model to enable commenting`CanComment`Add to user model for approval checks`ExtractsMentions`Parse HTML for tribute mentions`HasMentionables`Build mentionable lists from configLicense
-------

[](#license)

This package is dual-licensed:

- **MIT License** — Free for open source projects under an OSI-approved license.
- **Commercial License** — Required for proprietary/commercial projects. Visit [codenzia.com](https://codenzia.com) for details.

See [LICENSE.md](LICENSE.md) for full terms.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance56

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 98.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c09a47187ca823dff0650b985b6b1d0632bf550fffbd692005cb12ffae5e8ac?d=identicon)[mh2x](/maintainers/mh2x)

---

Top Contributors

[![sehsah](https://avatars.githubusercontent.com/u/8730764?v=4)](https://github.com/sehsah "sehsah (101 commits)")[![mh2x](https://avatars.githubusercontent.com/u/10361843?v=4)](https://github.com/mh2x "mh2x (2 commits)")

### Embed Badge

![Health badge](/badges/codenzia-filament-comments/health.svg)

```
[![Health](https://phpackages.com/badges/codenzia-filament-comments/health.svg)](https://phpackages.com/packages/codenzia-filament-comments)
```

###  Alternatives

[swekaj/cron-expression-generator

Generate valid cron expressions.

1069.1k1](/packages/swekaj-cron-expression-generator)[amazon/instantaccess-sdk-php

Amazon Instant Access SDK for PHP

1432.8k](/packages/amazon-instantaccess-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
