Commentify 4.0
Comments without an account.
Drop the same Livewire component on any Eloquent model. Authenticated users keep the full thread. Flip one config flag and visitors can comment with a name and email, Tailwind or Bootstrap, Laravel 12/13, Livewire 4.
Guest commenting
Off by default. Turn it on in config/commentify.php
'allow_guests' => true,
'guest' => [
'require_email' => true,
'show_gravatar' => true,
],
What you get:
- Name + email on the composer (email can be optional)
- Gravatar when an email is present
- Guest badge in the thread
- IP and user agent stored with the comment
- Guests cannot edit or delete
- Works with require_approval, hold guest comments for review
- Same markdown composer, emoji picker, replies, likes, and reporting
- Translation strings
- Your Blade still looks like this:
<livewire:comments :model="$article"/>
Upgrade from 3.x
composer require usamamuneerchaudhary/commentify:^4.0
php artisan migrate: required (user_id becomes nullable)
- Merge new keys into
config/commentify.php(allow_guests, guest)
If you published views, republish guest field partials:
php artisan vendor:publish --tag="commentify-tailwind-views"
php artisan vendor:publish --tag="commentify-bootstrap-views"
If you overrode CommentPolicy, create() now accepts ?Authenticatable $user = null
Breaking
user_idis nullable. Custom queries that assume every comment has a user needauthorName()/isGuest(), or an explicitwhereNotNull('user_id').- Published views without the new partials will not show the guest composer.
- Policy signature change if you copied
CommentPolicyinto your app. - Guest commenting stays off until you set
allow_gueststo true. Existing authenticated threads behave as before.