PHPackages                             ryangjchandler/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ryangjchandler/laravel-comments

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

ryangjchandler/laravel-comments
===============================

A dead-simple comments package for Laravel.

v1.1.0(3mo ago)22122.3k↑294.4%23[4 PRs](https://github.com/ryangjchandler/laravel-comments/pulls)MITPHPPHP ^8.2CI passing

Since Jun 23Pushed 2mo ago3 watchersCompare

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

READMEChangelog (4)Dependencies (26)Versions (14)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.

> 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 ryangjchandler/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

58

—

FairBetter than 98% of packages

Maintenance83

Actively maintained with recent releases

Popularity47

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 51.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 ~455 days

Total

4

Last Release

106d ago

Major Versions

v0.2.0 → v1.0.02024-03-12

PHP version history (2 changes)v0.1.0PHP ^8.1

v1.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/568d485d441c691b0358b9091254a6a671fef8f76b73f28af1180ad568d142b2?d=identicon)[ryangjchandler](/maintainers/ryangjchandler)

---

Top Contributors

[![ryangjchandler](https://avatars.githubusercontent.com/u/41837763?v=4)](https://github.com/ryangjchandler "ryangjchandler (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![faisuc](https://avatars.githubusercontent.com/u/7190009?v=4)](https://github.com/faisuc "faisuc (1 commits)")[![medilies](https://avatars.githubusercontent.com/u/35309918?v=4)](https://github.com/medilies "medilies (1 commits)")

---

Tags

laravelryangjchandlerlaravel-comments

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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