Skip to content

mish-ka-mishka/laravel-comments

Repository files navigation

Laravel Comments

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages