Skip to content

SpaceUserPivot Model ​

Stores the membership, role, and membership metadata for users inside spaces.

Table ​

  • Table: fcom_space_user

  • Primary key: id

  • Extends: Model

Attributes ​

ColumnTypeNullableDefaultDescription
idBIGINT UNSIGNEDNo—Primary key for the row.
space_idBIGINT UNSIGNEDYes—Space ID stored for this record.
user_idVARCHAR(194)No—WordPress user ID associated with the row.
statusVARCHAR(100)Yes'active'Lifecycle or moderation status.
roleVARCHAR(100)Yes'member'Membership role assigned to the user.
metaTEXTYes—Serialized meta payload used by FluentCommunity.
created_atTIMESTAMPYes—Creation timestamp maintained by the ORM.
updated_atTIMESTAMPYes—Update timestamp maintained by the ORM.

Relationships ​

MethodTypeTargetNotes
user()belongsToUserSignature: —
xprofile()belongsToXProfileSignature: —
space()belongsToBaseSpaceSignature: —

Scopes ​

ScopeParametersPurpose
BySpace$query, $spaceIdBy Space scope declared on the model.
ByUser$query, $userIdBy User scope declared on the model.

Key Methods ​

MethodDescription
—No additional public methods are documented for this model.

Usage Examples ​

php
use FluentCommunity\App\Models\SpaceUserPivot;

$records = SpaceUserPivot::query()
    ->bySpace(1)
    ->limit(10)
    ->get();

$first = SpaceUserPivot::query()->first();

FluentCommunity developer documentation