Getting started
Installation
Install the package, publish the config, and run the migrations.
composer require usamamuneerchaudhary/commentify
php artisan vendor:publish --tag=commentify-config
php artisan migrate
Add the Commentable trait to any model that should receive comments, then drop
the Livewire component into the view that renders it.
<livewire:comments :model="$article" />
That is the whole integration. Everything after this page is configuration.
Page notes (3)
Or Log in to comment!
Free crypto signals, guaranteed 40% weekly returns, message me at http://not-a-real-scam.example.com and http://also-fake.example.org right now!!
Suggestion: mention that
migratepicks up the package migrations automatically, so there is novendor:publish --tag=commentify-migrationsstep unless you want to edit them. I published them out of habit and ended up with duplicates.Might be worth saying explicitly that
$articlehas to be an Eloquent model instance, not an ID. I passed an ID first and the error message was not obvious.