Skip to content

State ​

File: src/Entities/State.php
Namespace: Unusualify\Modularous\Entities
Extends: Illuminate\Database\Eloquent\Model
Traits: HasTranslation

A translatable state definition (e.g. Draft, Active, In Review, Closed). States are linked to models through Stateable pivot records. Translations are always eager-loaded.

Fillable Attributes ​

AttributeTypeDescription
publishedboolWhether the state is active
codestringMachine-readable code
iconstringIcon identifier
colorstringColour for UI display

Translated Attributes ​

AttributeDescription
nameHuman-readable state name
activeTranslation active flag

Table ​

Resolved from modularous.tables.states, defaults to um_states.

  • Stateable — morph pivot linking states to models
  • HasStateable — trait that adds state support to models