mirror of
https://github.com/openvk/openvk
synced 2024-11-11 09:29:29 +03:00
Add Postable::getLastComments
This commit is contained in:
parent
98045ec121
commit
f235338d69
1 changed files with 5 additions and 0 deletions
|
@ -71,6 +71,11 @@ abstract class Postable extends Attachable
|
||||||
return (new Comments)->getCommentsCountByTarget($this);
|
return (new Comments)->getCommentsCountByTarget($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getLastComments()
|
||||||
|
{
|
||||||
|
return (new Comments)->getLastCommentsByTarget($this);
|
||||||
|
}
|
||||||
|
|
||||||
function getLikesCount(): int
|
function getLikesCount(): int
|
||||||
{
|
{
|
||||||
return sizeof(DB::i()->getContext()->table("likes")->where([
|
return sizeof(DB::i()->getContext()->table("likes")->where([
|
||||||
|
|
Loading…
Reference in a new issue