Search by

alfasix / alfakit-comments

faizanakbar10

Comments with mentions, reactions and notifications on any record of an AlfaKit panel: an infolist entry, a slide-over action, a table action and a polling widget.

Package info

github.com/alfasixbh/alfakit-comments

Homepage

Issues

pkg:composer/alfasix/alfakit-comments

Statistics

Installs: 51

Dependents: 0

Suggesters: 0

Stars: 0

v0.2.5 2026-10-27 09:31 UTC

This package is auto-updated.

Last update: 2026-10-29 13:42:01 UTC


README

by Alfa Six

This is a read-only split of the AlfaKit monorepo. Please open issues and pull requests there.

Comments with @ mentions, emoji reactions and notifications on any record of an AlfaKit panel, in the spirit of Filament's Commentions. It renders in React, Vue and Svelte with AlfaKit's built-in components.

Installation

composer require alfasix/alfakit-comments
php artisan vendor:publish --tag=alfakit-comments-migrations
php artisan migrate

Mention notifications use Laravel's notifications table (php artisan make:notifications-table) and show in the panel's bell with ->databaseNotifications().

Register

use AlfaSix\AlfakitComments\CommentsPlugin;

$panel->plugin(
    CommentsPlugin::make()
        ->reactions(['👍', '❤️', '😄', '🎉'])
        ->newestFirst()
        ->perPage(10),
);
use AlfaSix\AlfakitComments\Concerns\HasComments;
use AlfaSix\AlfakitComments\Concerns\IsCommenter;
use AlfaSix\AlfakitComments\Contracts\Commentable;
use AlfaSix\AlfakitComments\Contracts\Commenter;

class Ticket extends Model implements Commentable
{
    use HasComments;
}

class User extends Authenticatable implements Commenter
{
    use IsCommenter;
}

Usage

use AlfaSix\AlfakitComments\Actions\CommentsAction;
use AlfaSix\AlfakitComments\Actions\CommentsTableAction;
use AlfaSix\AlfakitComments\Infolists\Components\CommentsEntry;
use AlfaSix\AlfakitComments\Widgets\CommentsWidget;

// Infolist (view page), or a form (edit page)
Section::make('Comments')->schema([CommentsEntry::make()]);

// Header action: the comments in a slide-over
CommentsAction::make();

// Table row action
$table->recordActions([CommentsTableAction::make()]);

// A polling feed in a record page's footer widgets
protected function getFooterWidgets(): array
{
    return [CommentsWidget::class];
}

// From code
$ticket->comment('<p>Done!</p>', $user);

See the documentation for every option, the events and the policy.

License

MIT. See LICENSE.md.