janakkapadia / commentable
Commentable - Easy way to apply comment on any model.
1.0.5
2021-07-07 12:09 UTC
Requires
- php: ^7.3|^8.0
- illuminate/auth: ^6.0|^7.0|^8.0
- illuminate/database: ^6.0|^7.0|^8.0
- illuminate/support: ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0
README
Package setup steps:
-
Go to project root directory from terminal
-
Run following commands:
composer require janakkapadia/commentable php artisan vendor:publish --tag=comment-migrations php artisan migrate
-
You need add trait in following model:
use HasComments; -
Create Comment:
$model->comments()->create([ "comment" => "add content here" ]);