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 UNSIGNEDNoPrimary key for the row.
space_idBIGINT UNSIGNEDYesSpace ID stored for this record.
user_idVARCHAR(194)NoWordPress user ID associated with the row.
statusVARCHAR(100)Yes'active'Lifecycle or moderation status.
roleVARCHAR(100)Yes'member'Membership role assigned to the user.
metaTEXTYesSerialized meta payload used by FluentCommunity.
created_atTIMESTAMPYesCreation timestamp maintained by the ORM.
updated_atTIMESTAMPYesUpdate 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