PHPackages                             aldawoud/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. aldawoud/comments

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

aldawoud/comments
=================

A comment section package

04PHP

Since Oct 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/yousef-aldawoud/comment)[ Packagist](https://packagist.org/packages/aldawoud/comments)[ RSS](/packages/aldawoud-comments/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Comments package
================

[](#comments-package)

Comment package is a laravel package that allows users to comment on any other model after setup.

Installation
============

[](#installation)

Installing package

```
composer require aldawoud/comments
```

Add routes to the `web.php` file by adding the following code.

```
//web.php

Comment::routes();
```

Implementation
==============

[](#implementation)

Add an comment section ID column to the model you want to implement on.

```
// 2020_01_01_create_blog_table.php
...
    public function up()
    {
        Schema::create('blogs', function (Blueprint $table) {
            $table->id();
            $table->string("title");
            $table->string("content");
            $table->string("comment_section_id");
            $table->timestamps();
        });
    }
...
```

Routes
======

[](#routes)

NameRequest methodURLDescriptionExampleRequest parametersget-commentsGET/comment-section/{commentSectionId}/commentsGets the comments for a comment section/comment-section/1/commentsNONEcreate-commentPOST/comment-section/{commentSectionId}/creates new comment in a comment section/comment-section/1/comment(the comment text)get-comment-repliesGETcomment/{comment}/repliesGet replies for a comment using the id/comment/1/repliesNONEreply-to-commentPOSTcomment/{comment}/replyReplies to a comment/comment/1/replycomment(the comment text)Customization
=============

[](#customization)

The comments replies can be nested or can be done into two layers only. To change that you need to publish the package first.

```
php artisan vendor:publish
```

*Output*

```
Which provider or tag's files would you like to publish?:

```

Select `Provider: Aldawoud\Comments\CommentsServiceProvider` number

Then you can modify `nested` property in the comment model to true if you want replies to be nested and false if you want the replies to be two layered.

```
protected static $nested = true;
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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/353183f490f020879be7acdc1c24d5b73cc695f4052295fc7d0491e6a36397ca?d=identicon)[yousef-aldawoud](/maintainers/yousef-aldawoud)

---

Top Contributors

[![yousef-ysph](https://avatars.githubusercontent.com/u/43806260?v=4)](https://github.com/yousef-ysph "yousef-ysph (7 commits)")

### Embed Badge

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

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

###  Alternatives

[jaybizzle/hasmeta

Access model meta data as if it was a property on your model

291.9k](/packages/jaybizzle-hasmeta)[adesin-fr/inertiajs-tables-laravel-query-builder

Inertia.js Front-end Components for Spatie's Laravel Query Builder

261.7k](/packages/adesin-fr-inertiajs-tables-laravel-query-builder)

PHPackages © 2026

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