From f235338d6963e5aa660711f87813e83f9f4fbb94 Mon Sep 17 00:00:00 2001 From: Alma Armas Date: Sat, 1 Aug 2020 14:23:08 +0000 Subject: [PATCH] Add Postable::getLastComments --- Web/Models/Entities/Postable.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Web/Models/Entities/Postable.php b/Web/Models/Entities/Postable.php index 00b132b1..27c406fc 100644 --- a/Web/Models/Entities/Postable.php +++ b/Web/Models/Entities/Postable.php @@ -70,6 +70,11 @@ abstract class Postable extends Attachable { return (new Comments)->getCommentsCountByTarget($this); } + + function getLastComments() + { + return (new Comments)->getLastCommentsByTarget($this); + } function getLikesCount(): int {