PHPackages                             laravel-enso/commentsmanager - 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. laravel-enso/commentsmanager

Abandoned → [laravel-enso/comments](/?search=laravel-enso%2Fcomments)Library[Utility &amp; Helpers](/categories/utility)

laravel-enso/commentsmanager
============================

Comments Manager for Laravel Enso

4.6.7(1mo ago)1116.9k62MITPHP

Since Mar 20Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/laravel-enso/comments)[ Packagist](https://packagist.org/packages/laravel-enso/commentsmanager)[ Docs](https://github.com/laravel-enso/comments)[ RSS](/packages/laravel-enso-commentsmanager/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (12)Versions (247)Used By (2)

Comments
========

[](#comments)

[![License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Stable](https://camo.githubusercontent.com/0f704d9d07a9a63d1bfac392583bdc968f240ef80c5082005041934ba3ba954a/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f636f6d6d656e74732f76657273696f6e)](https://packagist.org/packages/laravel-enso/comments)[![Downloads](https://camo.githubusercontent.com/25c36a203f9074edef6a8d9e4c7432ec5b3f7826b611f6b94e704ba3e1ecf46d/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f636f6d6d656e74732f646f776e6c6f616473)](https://packagist.org/packages/laravel-enso/comments)[![PHP](https://camo.githubusercontent.com/da7cf113b588d26fe679dfefe4a15009272ed358ad4e786ad3c78b45faa61d69/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322532422d3737376262342e737667)](composer.json)[![Issues](https://camo.githubusercontent.com/ac9571d3127e461b4139806f544747266031b0c6dc4e5c759adb4cae5df080a2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c61726176656c2d656e736f2f636f6d6d656e74732e737667)](https://github.com/laravel-enso/comments/issues)[![Merge Requests](https://camo.githubusercontent.com/13253d1631602bf8b80f974b863814391842d78a427b7132567bd25fee80c6ac/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f6c61726176656c2d656e736f2f636f6d6d656e74732e737667)](https://github.com/laravel-enso/comments/pulls)

Description
-----------

[](#description)

Comments adds polymorphic comments and tagged-user notifications to Enso models.

The package exposes a reusable `Commentable` trait, ships the comments CRUD API used by the backoffice, tracks authorship through Enso audit traits, and supports tagged users through a pivot relation and queued notifications.

Delete behavior is configurable, allowing applications to either cascade comment deletion or block deletion when related comments exist.

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

[](#installation)

Install the package:

```
composer require laravel-enso/comments
```

Run the package migrations:

```
php artisan migrate
```

Optional publishes:

```
php artisan vendor:publish --tag=comments-config
php artisan vendor:publish --tag=comments-mail
php artisan vendor:publish --tag=comments-factory
```

Default configuration:

```
return [
    'editableTimeLimit' => 24 * 60 * 60,
    'onDelete' => 'cascade',
    'humanReadableDates' => true,
    'loggableMorph' => [
        'commentable' => [],
    ],
];
```

Features
--------

[](#features)

- Polymorphic one-to-one and one-to-many comments through the `Commentable` trait.
- Tagged users stored on a pivot table and notified through queued notifications.
- Shared mail layout and preview registration through `laravel-enso/mails`.
- Comments API with list, create, update, destroy, and user option endpoints.
- Configurable delete strategy via `restrict` or `cascade`.
- Automatic parent touching for updated commentable records.

Usage
-----

[](#usage)

Add the trait to any model that should expose comments:

```
use Illuminate\Database\Eloquent\Model;
use LaravelEnso\Comments\Traits\Commentable;

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

Available relationships:

- `comment()`
- `comments()`

When a model is deleted, the package will either reject the deletion or cascade comment deletion based on `enso.comments.onDelete`.

Tagged users can be synchronized and notified through the `Comment` model:

```
$comment->syncTags($taggedUsers)->notify('/posts/1');
```

API
---

[](#api)

### HTTP routes

[](#http-routes)

- `GET api/core/comments`
- `POST api/core/comments`
- `PATCH api/core/comments/{comment}`
- `DELETE api/core/comments/{comment}`
- `GET api/core/comments/users`

Route names:

- `core.comments.index`
- `core.comments.store`
- `core.comments.update`
- `core.comments.destroy`
- `core.comments.users`

### Model surface

[](#model-surface)

`LaravelEnso\\Comments\\Models\\Comment`

Useful methods:

- `scopeFor(array $params): Builder`
- `syncTags(array $taggedUsers)`
- `notify(string $path)`

Depends On
----------

[](#depends-on)

Required Enso packages:

- [`laravel-enso/core`](https://docs.laravel-enso.com/backend/core.html) [↗](https://github.com/laravel-enso/core)
- [`laravel-enso/dynamic-methods`](https://docs.laravel-enso.com/backend/dynamic-methods.html) [↗](https://github.com/laravel-enso/dynamic-methods)
- [`laravel-enso/helpers`](https://docs.laravel-enso.com/backend/helpers.html) [↗](https://github.com/laravel-enso/helpers)
- [`laravel-enso/mails`](https://github.com/laravel-enso/mails) [↗](https://github.com/laravel-enso/mails)
- [`laravel-enso/migrator`](https://docs.laravel-enso.com/backend/migrator.html) [↗](https://github.com/laravel-enso/migrator)
- [`laravel-enso/track-who`](https://docs.laravel-enso.com/backend/track-who.html) [↗](https://github.com/laravel-enso/track-who)
- [`laravel-enso/users`](https://docs.laravel-enso.com/backend/users.html) [↗](https://github.com/laravel-enso/users)

Companion frontend package:

- [`@enso-ui/comments`](https://docs.laravel-enso.com/frontend/comments.html) [↗](https://github.com/enso-ui/comments)

Contributions
-------------

[](#contributions)

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance92

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 77% 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 ~14 days

Total

238

Last Release

40d ago

Major Versions

1.3.3 → 2.1.242018-02-13

1.3.5 → 2.2.92018-05-10

2.4.23 → 3.0.02019-03-08

1.3.6 → 3.0.72019-04-09

3.3.8 → 4.0.02020-06-26

PHP version history (2 changes)1.0.0PHP &gt;=5.6.4

1.1.18PHP &gt;=7.1.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16073274?v=4)[Adrian Ocneanu](/maintainers/aocneanu)[@aocneanu](https://github.com/aocneanu)

---

Top Contributors

[![aocneanu](https://avatars.githubusercontent.com/u/16073274?v=4)](https://github.com/aocneanu "aocneanu (311 commits)")[![gandesc](https://avatars.githubusercontent.com/u/14071925?v=4)](https://github.com/gandesc "gandesc (54 commits)")[![vmcvlad](https://avatars.githubusercontent.com/u/37445394?v=4)](https://github.com/vmcvlad "vmcvlad (14 commits)")[![DevIonut](https://avatars.githubusercontent.com/u/19207797?v=4)](https://github.com/DevIonut "DevIonut (6 commits)")[![AbdullahiAbdulkabir](https://avatars.githubusercontent.com/u/33360580?v=4)](https://github.com/AbdullahiAbdulkabir "AbdullahiAbdulkabir (5 commits)")[![raftx24](https://avatars.githubusercontent.com/u/10864136?v=4)](https://github.com/raftx24 "raftx24 (5 commits)")[![jlsjonas](https://avatars.githubusercontent.com/u/932193?v=4)](https://github.com/jlsjonas "jlsjonas (3 commits)")[![GITmanuela](https://avatars.githubusercontent.com/u/44998004?v=4)](https://github.com/GITmanuela "GITmanuela (3 commits)")[![heyner29](https://avatars.githubusercontent.com/u/12703614?v=4)](https://github.com/heyner29 "heyner29 (1 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

accessoriescomment-tagcommentablecomments-managerlaravel-commentslaravel-ensocommentslaravel-ensocomments-manager

### Embed Badge

![Health badge](/badges/laravel-enso-commentsmanager/health.svg)

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

###  Alternatives

[laravel-enso/data-import

Excel Importer dependency for Laravel Enso

2043.6k6](/packages/laravel-enso-data-import)[laravel-enso/comments

Comments Manager for Laravel Enso

1140.5k1](/packages/laravel-enso-comments)[laravel-enso/localisation

Language and translation management for Laravel Enso

1362.3k11](/packages/laravel-enso-localisation)[laravel-enso/core

The backend shell of a Laravel Enso application

3464.9k201](/packages/laravel-enso-core)[laravel-enso/tutorials

Tutorial management backend for Laravel Enso

1140.4k](/packages/laravel-enso-tutorials)[laravel-enso/tables

Server-side data tables and export backend for Laravel Enso

63254.7k81](/packages/laravel-enso-tables)

PHPackages © 2026

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