Browsing as a guest. You can post with a name and email, like, and report. Sign in as Maya, Tomas, Priya… to pin, moderate, and see author badges from the other side.

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!

Jonas Weber Jonas Weber

Suggestion: mention that migrate picks up the package migrations automatically, so there is no vendor:publish --tag=commentify-migrations step unless you want to edit them. I published them out of habit and ended up with duplicates.

Lukas Novak Lukas Novak

Might be worth saying explicitly that $article has to be an Eloquent model instance, not an ID. I passed an ID first and the error message was not obvious.