asseco-voice/laravel-comments

Laravel comment system
6,936
Install
composer require asseco-voice/laravel-comments
Latest Version:v2.1.0
PHP:^8.1
License:MIT
Last Updated:Jan 9, 2025
Links: GitHub  ·  Packagist
Maintainer: Norgul

Comments

Purpose of this repository is to enable adding comments to any Laravel model.

Installation

Require the package with composer require asseco-voice/laravel-comments. Service provider will be registered automatically.

Setup

In order to use the package, migrate the tables with artisan migrate and add Commentable trait to model you'd like to have comment support on.

use Asseco\Comment\Contracts\Commentable;

class Product extends Model implements Commentable
{
    use Commentable;
    
    // ...   
}

Standard CRUD endpoints are exposed for comment administration, however if you'd like a dedicated controller to manage CRUD actions on a specific model you need to manually create it.

Extending the package

Publishing the configuration will enable you to change package models as well as controlling how migrations behave. If extending the model, make sure you're extending the original model in your implementation.

Related Packages

asseco-voice/laravel-containers

Adding container support to Laravel models

3,850 2
asseco-voice/laravel-blueprint-audit

Laravel support for additional blueprint methods

7,520 0
asseco-voice/laravel-tags

Laravel support for tags

6,956 0

Version History

Version Released PHP Laravel License
v2.1.0 ^8.1 ^10.0 MIT
v2.0.0 ^8.1 ^10.0 MIT
v1.1.0 ^8.0 ^9.0 MIT
v1.0.0 ^8.0 ^9.0 MIT
v0.4.0 ^7.4 || ^8.0 ^8.0 MIT