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
Requires
- php: ^7.4|^8.0
- illuminate/contracts: ^8.0|^9.0
- illuminate/database: ^8.0|^9.0
- illuminate/http: ^8.0|^9.0
- illuminate/support: ^8.0|^9.0
Requires (Dev)
- orchestra/testbench: ^5.0|^6.23|^7.0
- phpunit/phpunit: ^9.5.10
This package is auto-updated.
Last update: 2025-03-09 22:18:21 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