laravel-comments icon indicating copy to clipboard operation
laravel-comments copied to clipboard

Extend comments model

Open dambridge opened this issue 6 years ago • 1 comments

I'd like to override your comments model with my own, so that I may add some additional data when creating comments, either through setters, etc. What is the best approach to doing this?

dambridge avatar Jun 11 '19 00:06 dambridge

I did it this way

namespace App;

use BeyondCode\Comments\Comment as CommentSystem;
use Other\Trait\Name as NewTrait;

class Comment extends CommentSystem
{
    use NewTrait;
}

mreduar avatar Jul 17 '19 11:07 mreduar