Add ability to delete comments by moderators

This commit is contained in:
2026-05-06 19:02:50 +02:00
parent 59cb39ca77
commit fdf26604f3
9 changed files with 127 additions and 33 deletions

View File

@@ -72,4 +72,12 @@ class Comment extends Model
{
return cache()->remember('commentLikes'.$this->id, 300, fn () => $this->likes->count());
}
/**
* Returns wether or not comment has been removed by moderation
*/
public function isDeletedByModerator(): bool
{
return $this->deleted_by_moderator_id !== null;
}
}