> ## Documentation Index
> Fetch the complete documentation index at: https://docs.commentify.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# Filament

> Register the free and Pro plugins. Moderation queue, spam log, audit trail, and dashboard widgets.

Pro is **additive**. It never replaces the free plugin's Comments, Reports, or Settings resources.

```php theme={null}
use Usamamuneerchaudhary\Commentify\Filament\CommentifyPlugin;
use Usamamuneerchaudhary\CommentifyPro\Filament\CommentifyProPlugin;

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

The installer detects a missing `CommentifyProPlugin` in `app/Providers/Filament/*.php` and prints this snippet rather than rewriting the provider (a mangled panel file would take the whole admin down).

Filament is optional. `composer.json` suggests `filament/filament` `^4.0|^5.0`.

## Free plugin (core)

* **Comments** — edit, delete, approve / disapprove, bulk actions, filters (user, parent/child, approval)
* **Comment reports** — pending / reviewed / dismissed, reporter, reason, IP
* **Commentify Settings** — most `core` flags from the panel (`allow_guests` stays in config)

## Pro plugin

Navigation group **Commentify**.

### Moderation queue (`commentify-moderation-queue`)

Same `Comment` model, dedicated table. Badge shows pending count.

Columns: id, author (Guest if none), body excerpt, approved, reports badge, commentable type, created at.

Filters: pending only, has reports, contains links (`http` in body), commentable type.

Record actions:

| Action                      | Behaviour                                                 |
| --------------------------- | --------------------------------------------------------- |
| **Approve** / **Unapprove** | Sets `is_approved`; writes audit                          |
| **Ban author**              | `comment_banned_until` + 30 days (users only, not guests) |
| **Pin** / **Unpin**         | One parent pin per thread                                 |

Bulk: approve, unapprove, delete, ban — all go through `Moderator` so the audit log cannot drift.

### Spam log (`commentify-spam-logs`)

Pipeline verdicts (`review` / `deny`), excerpt, checker, reasons, user id.

**Not spam** — re-approves the matched held comment and submits ham to Akismet. See [Spam pipeline](/spam).

### Moderation audit (`commentify-mod-actions`)

Who did what: `approve`, `unapprove`, `delete`, `ban_author`, `not_spam`, `not_spam_unmatched`, plus `pin` / `unpin` from the queue. Moderator name, comment id, timestamp. The table filter lists the first five; pin rows still appear in the log.

### Widgets

* **Pending moderation** stat (cached count of `is_approved = false`)
* **Comments per day** chart

Registering the plugin adds these to the panel. They sit on the dashboard with your other widgets.

## Policies

Filament actions should remain consistent with Livewire and the API: same `CommentPolicy`, same bans. Do not bypass `Moderator` if you add custom actions — that class is the audit funnel.
