Require this package, with Composer, in the root directory of your project.
$ composer require amrnrd/commentable
To get started, you'll need to publish the vendor assets and migrate:
php artisan vendor:publish --provider="AmrNRD\Commentable\CommentableServiceProvider" && php artisan migrate
<?php
namespace App;
use AmrNRD\Commentable\Traits\HasComments;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
use HasComments;
}