Skip to content

SpaceGroup Model ​

Represents hierarchical group containers for organizing spaces on the portal.

Table ​

  • Table: fcom_spaces

  • Primary key: id

  • Extends: Model

Attributes ​

ColumnTypeNullableDefaultDescription
idBIGINT UNSIGNEDNo—Primary key for the row.
created_byBIGINT UNSIGNEDYes—WordPress user ID that created the record.
parent_idBIGINT UNSIGNEDYes—Parent row ID used for threading or hierarchy.
titleVARCHAR(194)No—Human-readable title stored for the record.
slugVARCHAR(194)No—Sanitized slug or public identifier.
logoTEXTYes—Logo stored for this record.
cover_photoTEXTYes—Cover Photo stored for this record.
descriptionLONGTEXTYes—Description stored for this record.
typeVARCHAR(100)Yes—Subtype discriminator for the row.
privacyVARCHAR(100)Yes'public'Visibility state used by feeds and spaces.
statusVARCHAR(100)Yes'published'Lifecycle or moderation status.
serialINT(11)Yes1Ordering index inside a group of related records.
settingsLONGTEXTYes—Serialized settings payload.
created_atTIMESTAMPYes—Creation timestamp maintained by the ORM.
updated_atTIMESTAMPYes—Update timestamp maintained by the ORM.

Relationships ​

MethodTypeTargetNotes
owner()belongsToUserSignature: —
spaces()hasManyBaseSpaceSignature: —

Scopes ​

ScopeParametersPurpose
SearchBy$query, $searchSearch By scope declared on the model.

Key Methods ​

MethodDescription
updateCustomData()Sanitizes and updates the editable attributes for a space group record.
defaultSettings()default Settings implemented on the model.

Usage Examples ​

php
use FluentCommunity\App\Models\SpaceGroup;

$records = SpaceGroup::query()
    ->searchBy('example')
    ->limit(10)
    ->get();

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

FluentCommunity developer documentation