You are viewing the documentation for an older version of this package. You can check the version you are using with the following command:
composer show spatie/laravel-comments
To use the Livewire components provided by this package, you must first install Livewire itself. Make sure you follow their installation instructions .
After that, you should follow the installation instructions of the base spatie/laravel-comments package. After following these instructions, you should have migrated your database and prepared your model.
With that all done, you're ready to pull in the spatie/laravel-comments-livewire
package
composer require spatie/laravel-comments-livewire
# # Using the assets
On each page where you want to use the components, you should include the styles and scripts provided by the package.
You can include the styles in the head of your page.
<head >
<x-comments ::styles />
</head >
If you're using Livewire 2, the script
should be included near the end of the body of the page. If you're using Livewire 3 this step is not necessary.
<body >
<x-comments ::scripts />
</body >
# # Troubleshooting
If you want problems installing the package, take a look at our demo app and compare it against yours.