janakkapadia/commentable

Commentable - Easy way to apply comment on any model.

1.0.5 2021-07-07 12:09 UTC

This package is auto-updated.

Last update: 2024-11-29 06:35:42 UTC


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"
    ]);