Configuration
All options live in config/vgcomment.php after:
php artisan vendor:publish --tag=vgcomment-configMany values can also be changed at runtime from Admin → Settings. Runtime DB settings override the file where applicable.
Languages
php artisan vendor:publish --tag=vgcomment-langTranslations: lang/vendor/vgcomment.
Routing & database
| Key | Default | Notes |
|---|---|---|
prefix | vgcomments | Base path: /vgcomments/... |
connection | env('VCOMMENT_DB_CONNECTION', 'mysql') | Package migrations/models use this connection |
table.* | vgcomments, vgcomment_files, … | Change before first migrate |
Guests & targets
'allow_guests' => true,
// Empty = page_id only (recommended default)
'allowed_commentable_types' => [
// \App\Models\Post::class,
],
// UI quick suggestions only — API accepts any emoji ≤ 32 chars
'reaction_types' => ['👍', '❤️', '😄', '😮', '😢', '😡'],Morph comments only work for classes listed in allowed_commentable_types.
Reactions
reaction_types is not an allowlist. The reaction endpoint validates type as a string of length 1–32 so full Unicode emoji (including ZWJ sequences) work with the full picker in Blade and Livewire. Use the config list only as optional quick chips if your UI shows them.
User columns
Map your user model attributes:
'user_column_name' => 'name',
'user_column_email' => 'email',
'user_column_url' => 'url',
'user_column_avatar_url' => 'avatar_url',Moderation
'moderation' => false, // hold all new comments for approval
'moderation_users' => [
'web' => [1], // who can open /{prefix}/admin
],
'moderation_keys' => [], // words → pending queue
'blacklist_keys' => [], // words → spamContent rules
'min_length' => 10,
'max_length' => 1000,
'throttle_max_rate' => 10,
'throttle_per_minutes' => 1,
'max_links' => 10,
'duplicates_check' => false,
'censor' => true,
'censors_text' => [],
'report_status' => 'pending', // or 'spam'
'max_reports' => 5,Avatars
'gravatar' => true,
'gravatar_imageset' => 'wavatar', // mp, identicon, monsterid, wavatar, retro, robohash, blank, 404Uploads
'disk_filesystem' => config('filesystems.default', 'local'),
'upload_rules' => ['max:5120', 'mimes:doc,pdf,jpg,jpeg,png,gif'],
'upload_rules_max' => 5,UI packages use two client paths against the same upload API:
- Paperclip → keep the file as an attachment chip on the comment
- Insert image / paste / drop → insert Markdown
into the comment body
Stream URLs use GET /{prefix}/files/{uuid}.{extension} (see REST API).
NSFW (Sightengine)
'nsfw' => false,
'nsfw_api_user' => '',
'nsfw_api_key' => '',reCAPTCHA v3
'recaptcha' => false,
'recaptcha_key' => env('RECAPTCHA_KEY', ''),
'recaptcha_secret' => env('RECAPTCHA_SECRET', ''),RECAPTCHA_KEY=your-site-key
RECAPTCHA_SECRET=your-secretUI packages load Google’s script when recaptcha is enabled.
Broadcast
'broadcast' => false,Optional realtime for Livewire (Echo). Leave off unless you configure broadcasting.
Env cheat sheet
VCOMMENT_DB_CONNECTION=mysql
RECAPTCHA_KEY=
RECAPTCHA_SECRET=