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

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

balaremember/laravel-comments-service
=====================================

Tree comments system for laravel projects

31PHP

Since Aug 30Pushed 7y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel comments
================

[](#laravel-comments)

Tree comments system for laravel projects.

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

[](#installation)

1. Add the next git repository definition into your composer.json file:

    ```
    "repositories": [
        ...
        {
            "type": "vcs",
            "url": "https://github.com/balaremember/laravel-comments-service"
        }
        ...
    ]

    ```
2. Run composer install:

    ```
    composer require balaremember/laravel-comments-service

    ```
3. ### Laravel

    [](#laravel)

    #### &gt;= laravel5.5

    [](#-laravel55)

    ServiceProvider will be attached automatically

    #### Other

    [](#other)

    In your `config/app.php` add `Balaremember\LaravelCommentsService\CommentsServiceProvider::class` to the end of the `providers` array:

    ```
    'providers' => [
        ...
        Balaremember\LaravelCommentsService\CommentsServiceProvider::class,
    ],
    ```

    If Lumen

    ```
    $app->register(Balaremember\LaravelCommentsService\CommentsServiceProvider::class);
    ```

    Publish Configuration

    ```
    php artisan vendor:publish --provider "Balaremember\LaravelCommentsService\CommentsServiceProvider"
    ```
4. Now you have comments config file with parameters:

    ```
    'userModel' => Path to your user model, (default: App\User)
    'perPage' => Number of comments on one page, (default: 10)
    'levelDepth' => Depth of nesting. (default: 3)
    ```

    Full description of the [config](https://github.com/balaremember/laravel-comments-service/blob/master/config/comments.php) variables
5. Custom Polymorphic Types in your AppServiceProvider like:

    - To connect comments to your model you need:

    ```
    class YourModel extends Model
    {
         public function comments()
         {
             return $this->morphMany(Balaremember\LaravelCommentsService\Entities\Comment::class, 'commentable');
         }
    }
    ```

    - By default, Laravel will use the fully qualified class name to store the type of the related model. However, you may wish to decouple your database from your application's internal structure.

    ```
     use Illuminate\Database\Eloquent\Relations\Relation;

     Relation::morphMap([
         'posts' => 'App\Post',
         'videos' => 'App\Video',
     ]);
    ```

    See more in [Laravel Documentation](https://laravel.com/docs/5.6/eloquent-relationships#polymorphic-relations)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a6d7296cb43f615dfc9b0337ad0fd7c03a4edb52c6e55113650105e2f14e398?d=identicon)[rtagirov](/maintainers/rtagirov)

---

Top Contributors

[![balaremember](https://avatars.githubusercontent.com/u/18466309?v=4)](https://github.com/balaremember "balaremember (1 commits)")

### Embed Badge

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

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

###  Alternatives

[yangbx/captcha-lumen

captcha for lumen

123.8k](/packages/yangbx-captcha-lumen)

PHPackages © 2026

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