Skip to content

v4.0

Choose a tag to compare

@usamamuneerchaudhary usamamuneerchaudhary released this 09 Sep 19:36
· 2 commits to main since this release

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_id is nullable. Custom queries that assume every comment has a user need authorName() / isGuest(), or an explicit whereNotNull('user_id').
  • Published views without the new partials will not show the guest composer.
  • Policy signature change if you copied CommentPolicy into your app.
  • Guest commenting stays off until you set allow_guests to true. Existing authenticated threads behave as before.