Skip to content

Term Model ​

Stores taxonomy-like topics, categories, and term metadata used by feeds and courses.

Table ​

  • Table: fcom_terms

  • Primary key: id

  • Extends: Model

Attributes ​

ColumnTypeNullableDefaultDescription
idBIGINT UNSIGNEDNo—Primary key for the row.
parent_idBIGINT UNSIGNEDYes—Parent row ID used for threading or hierarchy.
taxonomy_nameVARCHAR(50)No—Taxonomy Name stored for this record.
slugVARCHAR(100)No—Sanitized slug or public identifier.
titleLONGTEXTYes—Human-readable title stored for the record.
descriptionLONGTEXTYes—Description stored for this record.
settingsLONGTEXTYes—Serialized settings payload.
created_atTIMESTAMPYes—Creation timestamp maintained by the ORM.
updated_atTIMESTAMPYes—Update timestamp maintained by the ORM.

Relationships ​

MethodTypeTargetNotes
posts()belongsToManyFeedSignature: —
base_spaces()belongsToManyBaseSpaceSignature: —

Scopes ​

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

Key Methods ​

MethodDescription
posts()Returns the many-to-many relation between terms and feed posts.

Usage Examples ​

php
use FluentCommunity\App\Models\Term;

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

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

FluentCommunity developer documentation