Appearance
Stores feed comments, threaded replies, and their moderation-aware relationships.
Table: fcom_post_comments
fcom_post_comments
Primary key: id
id
Extends: Model
Model
BIGINT UNSIGNED
—
user_id
post_id
parent_id
reactions_count
0
message
LONGTEXT
message_rendered
meta
type
VARCHAR(100)
'comment'
content_type
'text'
status
'published'
is_sticky
TINYINT(1), cast: int
created_at
TIMESTAMP
updated_at
user()
belongsTo
User
xprofile()
XProfile
media()
hasOne
Media
post()
Feed
space()
hasOneThrough
BaseSpace
reactions()
hasMany
Reaction
SearchBy
$query, $search
ByContentModerationAccessStatus
$query, $user, $space = null
getCommentParentUserIds()
getHumanExcerpt()
use FluentCommunity\App\Models\Comment; $records = Comment::query() ->searchBy('example') ->limit(10) ->get(); $first = Comment::query()->first();
Comment Model
Stores feed comments, threaded replies, and their moderation-aware relationships.
Table
Table:
fcom_post_commentsPrimary key:
idExtends:
ModelAttributes
idBIGINT UNSIGNED—user_idBIGINT UNSIGNED—post_idBIGINT UNSIGNED—parent_idBIGINT UNSIGNED—reactions_countBIGINT UNSIGNED0messageLONGTEXT—message_renderedLONGTEXT—metaLONGTEXT—typeVARCHAR(100)'comment'content_typeVARCHAR(100)'text'statusVARCHAR(100)'published'is_stickyTINYINT(1), cast: int0created_atTIMESTAMP—updated_atTIMESTAMP—Relationships
user()belongsToUser—xprofile()belongsToXProfile—media()hasOneMedia—post()belongsToFeed—space()hasOneThroughBaseSpace—reactions()hasManyReaction—Scopes
SearchBy$query, $searchByContentModerationAccessStatus$query, $user, $space = nullKey Methods
getCommentParentUserIds()getHumanExcerpt()Usage Examples