PHPackages                             agilepixels/laravel-commentable - 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. [Database &amp; ORM](/categories/database)
4. /
5. agilepixels/laravel-commentable

ActiveLibrary[Database &amp; ORM](/categories/database)

agilepixels/laravel-commentable
===============================

A package to add comments to Eloquent Models

v1.3.0(5y ago)28421[1 issues](https://github.com/agilepixels/laravel-commentable/issues)1MITPHPPHP ^7.2|^8.0CI failing

Since Apr 9Pushed 5y ago2 watchersCompare

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

READMEChangelog (8)Dependencies (1)Versions (9)Used By (1)

Add comments to Eloquent Models
===============================

[](#add-comments-to-eloquent-models)

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

[](#installation)

You can install the package via composer:

```
composer require agilepixels/laravel-commentable
```

You must publish the migration with:

```
php artisan vendor:publish --provider="AgilePixels\Commentable\CommentableServiceProvider" --tag="migrations"
```

Migrate the `comments` table:

```
php artisan migrate
```

Optionally you can publish the config-file with:

```
php artisan vendor:publish --provider="AgilePixels\Commentable\CommentableServiceProvider" --tag="config"
```

### Using the traits

[](#using-the-traits)

To enable the comments for a model, use the `AgilePixels\Commentable\Traits\HasComments` trait on the model.

```
