Files
relaticle-comments/config/comments.php
manukminasyan 29fcbd8aec feat: initial release of relaticle/comments
Filament comments package with:
- Polymorphic commenting on any Eloquent model
- Threaded replies with configurable depth
- @mentions with autocomplete and user search
- Emoji reactions with toggle and who-reacted tooltips
- File attachments via Livewire uploads
- Reply and mention notifications via Filament notification system
- Thread subscriptions for notification control
- Real-time broadcasting (opt-in Echo) with polling fallback
- Dark mode support
- CommentsAction, CommentsTableAction, CommentsEntry for Filament integration
- 204 tests, 421 assertions
2026-03-26 23:02:56 +04:00

89 lines
1.8 KiB
PHP

<?php
use App\Models\User;
use Relaticle\Comments\Comment;
use Relaticle\Comments\Mentions\DefaultMentionResolver;
use Relaticle\Comments\Policies\CommentPolicy;
return [
'tables' => [
'comments' => 'comments',
],
'models' => [
'comment' => Comment::class,
],
'commenter' => [
'model' => User::class,
],
'policy' => CommentPolicy::class,
'threading' => [
'max_depth' => 2,
],
'pagination' => [
'per_page' => 10,
],
'reactions' => [
'emoji_set' => [
'thumbs_up' => "\u{1F44D}",
'heart' => "\u{2764}\u{FE0F}",
'celebrate' => "\u{1F389}",
'laugh' => "\u{1F604}",
'thinking' => "\u{1F914}",
'sad' => "\u{1F622}",
],
],
'mentions' => [
'resolver' => DefaultMentionResolver::class,
'max_results' => 5,
],
'editor' => [
'toolbar' => [
['bold', 'italic', 'strike', 'link'],
['bulletList', 'orderedList'],
['codeBlock'],
],
],
'notifications' => [
'channels' => ['database'],
'enabled' => true,
],
'subscriptions' => [
'auto_subscribe' => true,
],
'attachments' => [
'enabled' => true,
'disk' => 'public',
'max_size' => 10240,
'allowed_types' => [
'image/jpeg',
'image/png',
'image/gif',
'image/webp',
'application/pdf',
'text/plain',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
],
],
'broadcasting' => [
'enabled' => false,
'channel_prefix' => 'comments',
],
'polling' => [
'interval' => '10s',
],
];