PHPackages                             betalabs/laravel-comment - 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. betalabs/laravel-comment

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

betalabs/laravel-comment
========================

Just another comment system for laravel projects.

1.0.3(7y ago)018.5k—8.3%MITPHPPHP ^7.1.3

Since Jun 12Pushed 3y agoCompare

[ Source](https://github.com/Betalabs/laravel-comment)[ Packagist](https://packagist.org/packages/betalabs/laravel-comment)[ Docs](https://github.com/actuallymab/laravel-comment)[ RSS](/packages/betalabs-laravel-comment/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (20)Used By (0)

Laravel Comment
===============

[](#laravel-comment)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8123415431f49f2ae15ca729bb85fb0c1c74a9825ffb994b3f48ecfe6e265c0e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61637475616c6c796d61622f6c61726176656c2d636f6d6d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/actuallymab/laravel-comment)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/6e74c1e894566dae9c5e5e371254b02d1505b276cb3bab2700996a41de3ce49f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f61637475616c6c796d61622f6c61726176656c2d636f6d6d656e742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/actuallymab/laravel-comment)[![Total Downloads](https://camo.githubusercontent.com/eb6ea9c499ce8610a689ae70c99522129674b420a8f6bd09b28e0cb324e08175/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61637475616c6c796d61622f6c61726176656c2d636f6d6d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/actuallymab/laravel-comment)

Just another comment system for laravel projects.

Version Compatibility
---------------------

[](#version-compatibility)

LaravelLaravel Comment5.0.x0.1.x5.1.x0.1.x5.2.x0.1.x5.3.x0.2.x5.4.x0.3.x5.5.x0.4.x5.6.x0.5.x5.7.x0.6.xInstall
-------

[](#install)

Via Composer

```
$ composer require actuallymab/laravel-comment
```

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

If you don't use auto-discovery, or using Laravel version &lt; 5.5 Add service provider to your app.php file

```
\Actuallymab\LaravelComment\LaravelCommentServiceProvider::class
```

Publish &amp; Migrate comments table.

```
$ php artisan vendor:publish
$ php artisan migrate
```

Add `CanComment` trait to your User model.

```
use Actuallymab\LaravelComment\CanComment;
```

Add `Commentable` trait to your commentable model(s).

```
use Actuallymab\LaravelComment\Commentable;
```

If you want to have your own Comment Model create a new one and extend my Comment model.

```
class Comment extends Actuallymab\LaravelComment\Comment
{
  ...
}
```

Comment package comes with several modes.

1- If you want to Users can rate your model(s) with comment set `canBeRated` to true in your `Commentable` model.

```
class Product extends Model {
  use Commentable;

  protected $canBeRated = true;

  ...
}
```

2- If you want to approve comments for your commentable models, you must set `mustBeApproved` to true in your `Commentable` model.

```
class Product extends Model {
  use Commentable;

  protected $mustBeApproved = true;

  ...
}
```

3- You don't want to approve comments for all users (think this as you really want to approve your own comments?). So add your `User` model an `isAdmin` method and return it true if user is admin.

```
class User extends Model {
  use CanComment;

  protected $fillable = [
    'isAdmin',
    ....
  ];

  public function isAdmin() {
    return $this->isAdmin;
  }

  ...
}
```

Usage
-----

[](#usage)

```
$user = App\User::find(1);
$product = App\Product::find(1);

// $user->comment(Commentable $model, $comment = '', $rate = 0);
$user->comment($product, 'Lorem ipsum ..', 3);

// approve it -- if you are admin or you don't use mustBeApproved option, it is not necessary
$product->comments[0]->approve();

// get avg rating -- it calculates approved average rate.
$product->averageRate();

// get total comment count -- it calculates approved comments count.
$product->totalCommentCount();
```

Change log
----------

[](#change-log)

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

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

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

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Mehmet Aydın Bahadır](https://github.com/actuallymab)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 80.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 ~109 days

Recently: every ~194 days

Total

18

Last Release

1764d ago

Major Versions

v0.6.1 → 1.0.02018-11-21

PHP version history (7 changes)0.1.0PHP ~5.5|~7.0

0.2.0PHP &gt;=5.6.4

0.4.0PHP &gt;=7.0.0

0.5.0PHP &gt;=7.1.3

v0.6.0PHP &gt;=7.2.3

v0.6.1PHP ^7.1.3

v0.10.0PHP ^7.1.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5718a3a2c41de555560fde3279aaf122ce1584540c5f123e7661eaa3d79dba73?d=identicon)[diego-betalabs](/maintainers/diego-betalabs)

---

Top Contributors

[![ShortlyMAB](https://avatars.githubusercontent.com/u/4995979?v=4)](https://github.com/ShortlyMAB "ShortlyMAB (33 commits)")[![diego-betalabs](https://avatars.githubusercontent.com/u/1482834?v=4)](https://github.com/diego-betalabs "diego-betalabs (6 commits)")[![coding-sunshine](https://avatars.githubusercontent.com/u/3206025?v=4)](https://github.com/coding-sunshine "coding-sunshine (2 commits)")

---

Tags

laravel-commentactuallymab

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/betalabs-laravel-comment/health.svg)

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

###  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)[illuminatech/balance

Provides support for Balance accounting system based on debit and credit principle

16137.4k](/packages/illuminatech-balance)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[glhd/special

1929.4k](/packages/glhd-special)

PHPackages © 2026

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