Skip to content

Model Behavior Traits ​

These traits modify how individual model instances behave: slug routing, UUID keys, position ordering, dynamic spread attributes, state machines, and presenter patterns.

TraitDescription
HasSlugSlug generation, locale-aware slug storage, and resolveRouteBinding override
HasUuidOrdered UUID primary key replacing auto-increment
HasPositionInteger position column with auto-assignment and drag-and-drop reorder
HasSpreadableArbitrary JSON attributes stored in a Spread morph record, surfaced as model properties
HasStateableState machine backed by Stateable morph and shared states table
HasPresenterLightweight presenter pattern wrapping the model in a display class