Lakshan-Madushanka / laravel-comments

Integrate seamless commenting functionality into your Laravel project
https://lakm.gitbook.io/commenter/
MIT License
217 stars 5 forks source link

Model must use the LakM\Comments\Contracts\CommenterContract interface #45

Open dungphanxuanhn opened 2 hours ago

dungphanxuanhn commented 2 hours ago

Bug type

Installation

Commenter Version

Dev

Description

It not work when install

Class Post Model `class Post extends Model implements CommenterContract, CommentableContract {

use Commentable;

... ` View

` {{-- Article content --}} {!! $modelPost->content!!}

            <x-comments::index :model="$modelPost" />

`

Steps To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Reproduce URL

No response

dungphanxuanhn commented 2 hours ago

image

Lakshan-Madushanka commented 14 minutes ago

CommenterContract must be implemented by your user model https://lakm.gitbook.io/commenter/basics/usage#implement-commentercontract-and-import-commenter-trait-in-commenter-model