Closed JonPurvis closed 3 years ago
If I am not mistaken, you don't need to extend the Comment model to implement this.
Your commenter
model should have SoftDeletes
trait added, and then you can access the "deleted" commenter with:
$comment->commenter()->withTrashed()->first();
or something like that.
Let me know if it works for you.
Right you are, that works fine for me!
Thanks for the response 😄 👍
I'm trying to change comments with soft deleted
commenter
relations to still show the commenter, utilisingwithTrashed()
but I've hit a problem. I've updatedcomments.php
config file so it uses my new class:in there, I've got:
My class is extending
Laravelista\Comments\Comment
:But it doesn't seem to be picking up the fact I specified my own class. Have I missed something here?