PHPackages                             cswni/laravel-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. cswni/laravel-comments

ActiveLibrary

cswni/laravel-comments
======================

A dead-simple comments package for Laravel.

v0.0.6(10mo ago)0203MITPHPPHP ^8.2

Since May 11Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/cswni/laravel-comments)[ Packagist](https://packagist.org/packages/cswni/laravel-comments)[ Docs](https://github.com/cswni/laravel-comments)[ RSS](/packages/cswni-laravel-comments/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (13)Versions (7)Used By (0)

A dead-simple comments package for Laravel.
===========================================

[](#a-dead-simple-comments-package-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b8c0b622f3c96dd2dba447f630459fb1a5870c23c9e8ea9c4f15f825a275df69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7279616e676a6368616e646c65722f6c61726176656c2d636f6d6d656e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ryangjchandler/laravel-comments)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3a886430e2d6c4e2dce30e1f179fc25fa7addcec0de6e18ffa694e8d5b4d9235/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7279616e676a6368616e646c65722f6c61726176656c2d636f6d6d656e74732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/ryangjchandler/laravel-comments/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/7e20f9638e753b4a86c0b71858e0c2dcb65ef865a45e4780702085179c253e16/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7279616e676a6368616e646c65722f6c61726176656c2d636f6d6d656e74732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/ryangjchandler/laravel-comments/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/fab9e062c88c8f0b35785ba0970850595f56bce2223b7aff1353e6788ca121cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7279616e676a6368616e646c65722f6c61726176656c2d636f6d6d656e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ryangjchandler/laravel-comments)

This package provides an incredibly simple comment system for your Laravel applications.

> **Compatibility:** This package supports Laravel 11 and Laravel 12.

> If you're looking for a package with UI components, I highly recommend using [Spatie's `laravel-comments`](https://laravel-comments.com/) package which comes with Livewire support out of the box.

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

[](#installation)

You can install the package via Composer:

```
composer require cswni/laravel-comments
```

The package automatically registers migrations so there's no need to publish anything, just run them.

```
php artisan migrate

```

You can publish the config file with:

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

This is the contents of the published config file:

```
return [

    'model' => \RyanChandler\Comments\Models\Comment::class,

    'user' => \App\Models\User::class,

];
```

Usage
-----

[](#usage)

Start by using the `RyanChandler\Comments\Concerns\HasComments` trait on your model.

```
use RyanChandler\Comments\Concerns\HasComments;

class Post extends Model
{
    use HasComments;
}
```

This trait adds a `comments(): MorphMany` relationship on your model. It also adds a new `comment()` method that can be used to quickly add a comment to your model.

```
$post = Post::first();

$post->comment('Hello, world!');
```

By default, the package will use the authenticated user's ID as the "commentor". You can customise this by providing a custom `User` to the `comment()` method.

```
$post->comment('Hello, world!', user: User::first());
```

The package also supports `parent -> children` relationships for comments. This means that a comment can `belongTo` another comment.

```
$post->comment('Thanks for commenting!', parent: Comment::find(2));
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ryan Chandler](https://github.com/ryangjchandler)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 71% of packages

Maintenance54

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

6

Last Release

308d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0415537a74f94340a66fe825a0890758e5dc816ace241cba183c8128bfc9918e?d=identicon)[cswni](/maintainers/cswni)

---

Top Contributors

[![cswni](https://avatars.githubusercontent.com/u/14812743?v=4)](https://github.com/cswni "cswni (7 commits)")

---

Tags

laravelryangjchandlerlaravel-commentscswni

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/cswni-laravel-comments/health.svg)

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

###  Alternatives

[ryangjchandler/laravel-comments

A dead-simple comments package for Laravel.

22017.7k](/packages/ryangjchandler-laravel-comments)[ryangjchandler/laravel-cloudflare-turnstile

A simple package to help integrate Cloudflare Turnstile.

424806.5k1](/packages/ryangjchandler-laravel-cloudflare-turnstile)[ryangjchandler/blade-cache-directive

Cache chunks of your Blade markup with ease.

203191.2k1](/packages/ryangjchandler-blade-cache-directive)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.0k](/packages/ryangjchandler-bearer)

PHPackages © 2026

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