Deploy & assets
Most “comments look unstyled” issues are missing published files under public/vendor/.
Required folders
| Package | Publish tag | Output |
|---|---|---|
| vgcomments | vgcomment-assets | public/vendor/vgcomments/ |
| livewire-comments | vgcomment-assets-livewire | public/vendor/livewire-comments/ |
| blade-comments | vgcomment-assets-blade | public/vendor/blade-comments/ |
Minimum files:
public/vendor/vgcomments/css/style.css
public/vendor/vgcomments/js/app.js
public/vendor/livewire-comments/css/comments.css
public/vendor/livewire-comments/js/comments.js
public/vendor/blade-comments/css/comments.css
public/vendor/blade-comments/js/comments.jsPublish on the server
bash
php artisan vendor:publish --tag=vgcomment-assets --force
php artisan vendor:publish --tag=vgcomment-assets-livewire --force # if using Livewire UI
php artisan vendor:publish --tag=vgcomment-assets-blade --force # if using Blade UI
php artisan optimize:clearOr rsync/copy public/vendor/ from a build machine. Do not confuse this with Composer’s vendor/ directory.
Blade directives
| Directive | Loads |
|---|---|
@commentStyles / @commentScripts | Livewire UI assets |
@commentBladeStyles / @commentBladeScripts | Blade UI assets |
They point at asset('vendor/...'). If the file is missing, the browser gets 404 and the UI falls back to raw HTML controls.
Load these directives only on pages that show comments. Do not put them in global guest/login layouts — that caused invisible login buttons when Tailwind/Plyr styles leaked in earlier 1.x builds.
Production checklist
APP_ENV=production,APP_DEBUG=false- Correct
APP_URL(andASSET_URLif you use a CDN) composer install --no-dev- Migrate, then cache config/routes/views
- Web server document root =
public/ - Confirm vendor CSS URLs return 200
Example:
bash
curl -I https://your-domain/vendor/blade-comments/css/comments.cssAuto-publish after Composer update
json
{
"scripts": {
"post-update-cmd": [
"@php artisan vendor:publish --tag=vgcomment-assets --force",
"@php artisan vendor:publish --tag=vgcomment-assets-livewire --force",
"@php artisan vendor:publish --tag=vgcomment-assets-blade --force"
]
}
}Only keep the tags you actually use.