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-04-29 04:40:57 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"
    ]);