Skip to content

Livewire — Installation ​

bash
composer require vigstudio/livewire-comments:^2.0

Requires Livewire ^4.0 and installs vigstudio/vgcomments ^2.0 as well.

Publish ​

bash
php artisan vendor:publish --tag=vgcomment-config
php artisan vendor:publish --tag=vgcomment-assets
php artisan vendor:publish --tag=vgcomment-assets-livewire

Optional view overrides:

bash
php artisan vendor:publish --tag=vgcomment-views-livewire

After upgrades:

bash
php artisan vendor:publish --tag=vgcomment-assets --force
php artisan vendor:publish --tag=vgcomment-assets-livewire --force

Migrate & clear ​

Configure config/vgcomment.php first (especially moderation_users and connection), then:

bash
php artisan migrate
php artisan optimize:clear

Layout assets ​

In your layout:

html
<head>
    ...
    @livewireStyles
    @commentStyles
</head>
<body>
    ...
    @livewireScripts
    @commentScripts
</body>

Confirm files exist:

public/vendor/livewire-comments/css/comments.css
public/vendor/livewire-comments/js/comments.js
public/vendor/vgcomments/...   # admin / shared backend assets

You do not need a separate Alpine CDN include for Livewire 4 (Alpine ships with Livewire).

Layout isolation

Only include @commentStyles / @commentScripts on comment pages — not on global guest/login layouts.

Next ​

Usage

MIT · Blade-first for 2.x · Livewire 4 supported