Activity Log Formatting
Models implementingDomainObjectContract with HasDomainObject trait get automatic activity logging with customizable formatting.
Custom Labels
OverrideformatActivityLogAttributeLabel() for custom attribute labels:
Custom Values
OverrideformatActivityLogAttributeValue() for custom value formatting:
Custom Descriptions
OverrideformatActivityLogDescription() for custom activity descriptions:
ActivityValueFormatter Methods
enum($enumClass, $value)- Format enums usinglabel()methodobjectReference($modelClass, $value)- Create linked object referencesdate($value)/datetime($value)- Format datesauto($model, $key, $value)- Auto-format based on model casts
Default Behavior
- Logs all attributes except timestamps/system fields
- Auto-generates labels from attribute names
- Auto-formats dates, enums, and other cast types
- Only logs dirty (changed) attributes