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

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

ufutx/laravel-comment
=====================

Just another comment system for laravel projects.

v1.1.4(9y ago)72201MITPHPPHP &gt;=5.6.4

Since Feb 23Pushed 3y ago2 watchersCompare

[ Source](https://github.com/glore/laravel-comment)[ Packagist](https://packagist.org/packages/ufutx/laravel-comment)[ Docs](https://github.com/glore/laravel-comment)[ RSS](/packages/ufutx-laravel-comment/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (6)Versions (16)Used By (0)

Laravel Comment (forked from actuallymab/laravel-comment)
=========================================================

[](#laravel-comment-forked-from-actuallymablaravel-comment)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2ff1bc693e7d3ad565b0f0af5b4dec0729ec97efb0955eea22862f46c1338e1b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f75667574782f6c61726176656c2d636f6d6d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ufutx/laravel-comment)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/bbf8e7dd8cbd8cb3f0d30e305bbe38aad4a59690926ac34a31c91a28d8c6dcd1/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f75667574782f6c61726176656c2d636f6d6d656e742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/ufutx/laravel-comment)[![Total Downloads](https://camo.githubusercontent.com/1324094b9feeb589df76a0f3f64b88aeaeddffff9d19048a85ad17349fb44007/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f75667574782f6c61726176656c2d636f6d6d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ufutx/laravel-comment)

\*\*Just another comment system for laravel projects.

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

[](#version-compatibility)

LaravelLaravel Comment5.4.x1.1.x5.2.x0.3.xInstall
-------

[](#install)

Via Composer

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

Add service provider to your app.php file

```
\Ufutx\LaravelComment\LaravelCommentServiceProvider::class
```

Publish &amp; Migrate comments table.

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

Add `CanComment` trait to your User model.

```
use Ufutx\LaravelComment\CanComment;
```

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

```
use Ufutx\LaravelComment\Commentable;
```

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

```
class Comment extends Ufutx\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, $pic = null);
$user->comment($product, 'Lorem ipsum ..', 3, 'http://images.ufutx.com/201702/09/49fe31fdf2d4f74709f2cb00e1a9c49a.jpeg@1e_1c_2o_1l_200h_200w_90q.src');

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

//comment user model record
$product->comments[0]->user

// 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  or zglore instead of using the issue tracker.

Credits
-------

[](#credits)

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

License
-------

[](#license)

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

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 59.6% 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 ~5 days

Recently: every ~15 days

Total

15

Last Release

3334d ago

Major Versions

v0.3.6 → v1.0.02017-03-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2793574?v=4)[glore Zeng](/maintainers/glore)[@glore](https://github.com/glore)

---

Top Contributors

[![glore](https://avatars.githubusercontent.com/u/2793574?v=4)](https://github.com/glore "glore (28 commits)")[![ShortlyMAB](https://avatars.githubusercontent.com/u/4995979?v=4)](https://github.com/ShortlyMAB "ShortlyMAB (18 commits)")[![coding-sunshine](https://avatars.githubusercontent.com/u/3206025?v=4)](https://github.com/coding-sunshine "coding-sunshine (1 commits)")

---

Tags

commentufutxlaravel-commentUfutx

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-settings

Store your application settings

1.5k6.8M139](/packages/spatie-laravel-settings)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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