PHPackages                             centrex/livewire-comments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. centrex/livewire-comments

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

centrex/livewire-comments
=========================

Manege comments with livewire in laravel

v2.0.0(6mo ago)12.5k[3 PRs](https://github.com/centrex/livewire-comments/pulls)MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Nov 13Pushed 2mo agoCompare

[ Source](https://github.com/centrex/livewire-comments)[ Packagist](https://packagist.org/packages/centrex/livewire-comments)[ Docs](https://github.com/centrex/livewire-comments)[ RSS](/packages/centrex-livewire-comments/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (15)Versions (14)Used By (0)

Manege comments with livewire in laravel
========================================

[](#manege-comments-with-livewire-in-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5af1a214ffde31a37dc146590568b4feec31c81121d568e2a095d2f5c6858ac9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63656e747265782f6c697665776972652d636f6d6d656e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/centrex/livewire-comments)[![GitHub Tests Action Status](https://camo.githubusercontent.com/4383e5f5379bf30ae6fcc83632a47da39588f5ee9113e054cfe223778c08350a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63656e747265782f6c697665776972652d636f6d6d656e74732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/centrex/livewire-comments/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/333771b1f75d20525436053ffe72421954ec79830059d11ca4eeb843edb44517/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63656e747265782f6c697665776972652d636f6d6d656e74732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/centrex/livewire-comments/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/b2b553a1439a634f0ee19eeb8e2d95ed47708ed02a56f8f64c3842a2583b3685/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63656e747265782f6c697665776972652d636f6d6d656e74733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/centrex/livewire-comments)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Contents
--------

[](#contents)

- [Some Features Highlight](#some-features-highlight)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage Examples](#usage)
- [Testing](#testing)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

Some Features Highlight
-----------------------

[](#some-features-highlight)

- Easy to integrate
- Supports Laravel 10+
- Supports Livewire 3
- Livewire powered commenting system
- Tailwind UI
- Add comments to any model
- Nested Comments
- Comments Pagination
- Youtube style Like/unlike feature
- Guest like/unlike of comments (based on `IP` &amp; `UserAgent`)
- Mention User with @ in Replies/Edits

Prerequisites
-------------

[](#prerequisites)

- [Livewire](https://laravel-livewire.com/docs/2.x/installation)
- [TailwindCSS](https://tailwindcss.com/)
- [AlpineJS](https://alpinejs.dev/essentials/installation)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require centrex/livewire-comments
```

You can run the migrations with:

```
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="comments-config"
```

you can publish `tailwind.config.js` file,

This package utilizes TailwindCSS, and use some custom configurations. You can publish package's `tailwind.config. js` file by running the following command:

```
php artisan vendor:publish --tag="comments-tailwind-config"
```

Usage
-----

[](#usage)

In your model, where you want to integrate comments, simply add the `Commentable` trait in that model. For example:

```
use Centrex\LivewireComments\Traits\Commentable;

class Article extends Model
{
    use Commentable;
}
```

Next, in your view, pass in the livewire comment component. For example, if your view file is `articles/show.blade. php`. We can add the following code:

```

```

#### Additionally, add the `HasUserAvatar` trait in `App\Models\User`, to use avatars:

[](#additionally-add-the-hasuseravatar-trait-in-appmodelsuser-to-use-avatars)

```
use Centrex\LivewireComments\Traits\HasUserAvatar;

class User extends Model
{
    use HasUserAvatar;
}
```

Testing
-------

[](#testing)

🧹 Keep a modern codebase with **Pint**:

```
composer lint
```

✅ Run refactors using **Rector**

```
composer refacto
```

⚗️ Run static analysis using **PHPStan**:

```
composer test:types
```

✅ Run unit tests using **PEST**

```
composer test:unit
```

🚀 Run the entire test suite:

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Laravel](https://laravel.com)
- [Tailwind](https://tailwindcss.com/)
- [Livewire](https://laravel-livewire.com/)
- [FlowBite](https://flowbite.com)
- [centrex](https://github.com/centrex)
- [All Contributors](../../contributors)
- [commentify](https://github.com/usamamuneerchaudhary/commentify/)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance78

Regular maintenance activity

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 65.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~102 days

Recently: every ~177 days

Total

8

Last Release

202d ago

Major Versions

v1.1.0 → v2.0.02025-10-29

PHP version history (3 changes)v1.0.0PHP ^8.1

v1.0.4PHP ^8.1|^8.2

v1.1.0PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b62fd49922fd1bf7d55b94cc82ebc9f359af7f343b246a7e3a2642779c0b4e7?d=identicon)[rochi88](/maintainers/rochi88)

---

Top Contributors

[![rochi88](https://avatars.githubusercontent.com/u/29769944?v=4)](https://github.com/rochi88 "rochi88 (36 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")

---

Tags

laravellivewire-commentscentrex

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/centrex-livewire-comments/health.svg)

```
[![Health](https://phpackages.com/badges/centrex-livewire-comments/health.svg)](https://phpackages.com/packages/centrex-livewire-comments)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[glhd/special

1929.4k](/packages/glhd-special)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
