mkaverin/laravel-comments

There is no license information available for the latest version (dev-master) of this package.

This package provides a simple way to add comments to your Laravel application.

dev-master 2022-06-09 16:37 UTC

This package is auto-updated.

Last update: 2024-05-09 20:38:54 UTC


README

This package provides a simple way to add comments to your Laravel application.

Installation

Run the following command from your project directory to add the dependency:

composer require mkaverin/laravel-comments

Then, copy and run database migrations:

php artisan vendor:publish --provider="Comments\Providers\CommentsServiceProvider" --tag=migrations
php artisan migrate

Laravel without auto-discovery

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php:

'providers' => [
    ...
    Comments\Providers\CommentsServiceProvider::class,
],

Configuration

You can copy the package config with the publish command:

php artisan vendor:publish --provider="Comments\Providers\CommentsServiceProvider"

You can find published config in config/comments.php.

Usage

Preparing your model

The model you want to attach comments to must use the Comments\Traits\HasComments trait.

Testing

composer test