sinclairt/commentable

Add comments to objects

Maintainers

Package info

github.com/sinclairt/commentable

pkg:composer/sinclairt/commentable

Statistics

Installs: 10

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.1 2017-03-29 12:32 UTC

This package is not auto-updated.

Last update: 2026-03-29 04:40:29 UTC


README

Installation

composer require sinclairt/commentable

Add Sinclair\Commentable\CommentableServiceProvider::class to config\app.php

php artisan vendor:publish

Run the migrations php artisan migrate

Usage

Set your user class in the commentable config file.

Use the trait use Commentable; in your model. now you can create comments against objects in your app.

Please note that the relationship is now a polymorphic one-to-many, a comment can belong to any ONE object, and an object can have MANY comments. It is no longer many-to-many.