-
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" ]);
janakkapadia/commentable
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|