LogsActivity
trait LogsActivity
LogsActivity model trait
* In the model class definition:
use \Igniter\Flame\Database\Traits\LogsActivity;
You can log the changed attributes for all these events : protected static $logAttributes = ['name', 'text'];
You can customize the events being logged : protected static $recordEvents = ['deleted'];
You can customize the description : public function getMessageForEvent(string $eventName) { return "This model has been {$eventName}"; };
You can ignore changes to certain attributes : protected static $ignoreChangedAttributes = ['text'];
You can log only the changed attributes : protected static $logOnlyDirty = true;
Properties
protected | $enableLoggingModelsEvents | ||
protected | $oldAttributes |
Methods
No description
No description
No description
No description
No description
No description
Get the event names that should be recorded.
No description
No description
No description
No description
No description
No description
No description
No description
Details
at line 43
static protected
bootLogsActivity()
No description
at line 72
disableLogging()
No description
at line 79
enableLogging()
No description
at line 86
activity()
No description
at line 91
getMessageForEvent($eventName)
No description
at line 96
getLogNameToUse($eventName = '')
No description
at line 104
static protected
eventsToBeRecorded()
Get the event names that should be recorded.
at line 123
attributesToBeIgnored()
No description
at line 135
ActivityLogger
getActivityLogger()
No description
at line 140
shouldLogOnlyDirty()
No description
at line 149
attributesToBeLogged()
No description
at line 158
protected
shouldLogEvent($eventName)
No description
at line 178
attributeValuesToBeLogged($processingEvent)
No description
at line 202
static
logChanges(Model $model)
No description
at line 217
static protected
getRelatedModelAttributeValue(Model $model, $attribute)
No description