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 UNSIGNEDNoPrimary key for the row.
parent_idBIGINT UNSIGNEDYesParent row ID used for threading or hierarchy.
taxonomy_nameVARCHAR(50)NoTaxonomy Name stored for this record.
slugVARCHAR(100)NoSanitized slug or public identifier.
titleLONGTEXTYesHuman-readable title stored for the record.
descriptionLONGTEXTYesDescription stored for this record.
settingsLONGTEXTYesSerialized settings payload.
created_atTIMESTAMPYesCreation timestamp maintained by the ORM.
updated_atTIMESTAMPYesUpdate 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