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

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

m4riachi/laravel-comment
========================

add comment bloc to your laravel application

1.0.0(1y ago)09MITPHPPHP ^7.4 || ^8.0

Since Dec 6Pushed 1y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (4)Used By (0)

Laravel comment package
=======================

[](#laravel-comment-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b05db2c6f83c3fa9c5bac34be6302102a82bb629bcbf0ad298d3128f50548396/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d347269616368692f6c61726176656c2d636f6d6d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m4riachi/laravel-comment)[![Total Downloads](https://camo.githubusercontent.com/9f731579163366e69d6c6c598ff2d2d039956b16b8459fac6ad2623101ae641b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d347269616368692f6c61726176656c2d636f6d6d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m4riachi/laravel-comment)

This package add a comment block in the page where it is inserted, the comment is linked to a page (link) not to a model.

Example: if you put the tag on the **** the comments will be linked to this url path.

The tag use the bootstrap css for the styling.

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

[](#installation)

You can install the package via composer:

```
composer require m4riachi/laravel-comment
```

You have publish and run the migrations with:

```
php artisan vendor:publish --provider="M4riachi\LaravelComment\LaravelCommentServiceProvider" --tag=migrations
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="M4riachi\LaravelComment\LaravelCommentServiceProvider" --tag=config
```

#### Optional

[](#optional)

If you need to make change in the html design the views files with:

```
php artisan vendor:publish --provider="M4riachi\LaravelComment\LaravelCommentServiceProvider" --tag=views
```

Usage
-----

[](#usage)

For the **front side** there is two tags to include in the html of the page where you want to add the comment block.

```

```

This tag will show the comment form and a list of inserted comment on this page.

```

```

This one will add the javascript needed.

For the **back side** there is just one tag.

```

```

This tag need to use it in the back office, will show all the comment inserted with pagination and two action.

- An action to change the comment status
- And delete action

\####Config file

From the config file you can configure many option.

- You can set if a guest user can post a comment, if true 2 input will by added to the form (name, email)

```
'guest-user' => true, //enable guest user to post a comment
```

- You can choose the type of post : normal or ajax post. the plugin use axios to execute ajax

```
'ajax' => [
    'enable' => true, //enable ajax post
    'include_axios' => true, // if false you must have axios on your js files
],
```

- By default, the status of every new post is pending, and you have to change the status from the backoffice side

```
'default_status' => 'pending', // there is two options [pending or approved]
```

- like in the description the comment tag is linked to an url path /toto/fofo, if you want to link also the url query you have to enable it. /toto/fofo?param=1 will be different to /toto/fofo?param=2

```
'with_url_query' => false,
```

- Set the model user if he is different to \\App\\Models\\User

```
'with_url_query' => false,
```

- The input validator

```
'input-validator' => [
    'user_name' => ['required', 'string', 'max:192'],
    'user_email' => ['required', 'string', 'email', 'max:192'],
    'comment' => ['required', 'string'],
],
```

- If you want to use recaptcha v3 on your form

```
'recaptcha' => [
    'enable' => false,
    'site-key' => '',
    'secret-key' => '',
    'checked_score' => 0.4
],
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

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

Credits
-------

[](#credits)

- [Taoufiq BEN](https://github.com/m4riachi)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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.

###  Release Activity

Cadence

Every ~546 days

Total

3

Last Release

525d ago

Major Versions

0.1.0 → 1.0.02024-12-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/390a83d9d58c1850e631ddb38dda2fa6fb539fb9814ef80d5f5baaa68d723105?d=identicon)[m4riachi](/maintainers/m4riachi)

---

Top Contributors

[![m4riachi](https://avatars.githubusercontent.com/u/32671710?v=4)](https://github.com/m4riachi "m4riachi (14 commits)")

---

Tags

laravel-commentm4riachi

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-enum

Laravel Enum support

3655.4M31](/packages/spatie-laravel-enum)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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