- Fixed MySQL/Postgres truncation errors when the user-agent string is longer than 255 characters by truncating the string to 255 chars before inserting to the DB
- Added Job Tracking and logging feature
- Added job-tracking-related events
- Added the
action
Operation type - Added the
details
field to the model history table/model - Added the
logActionSuccess()
andlogActionFailure()
factory methods to theHistory
class
- Added Laravel 11 support
- Changed the minimum PostgreSQL version to v12, due to an incompatibility detected with Laravel 11.0.0 and PostgreSQL 11
- Added the
oldIsUndefined()
&newIsUndefined()
methods to theChange
class
- Changed the behavior of logRecentUpdate: if there are no changes, then it won't write an empty event in the history
- Changed the behavior of logUpdate: it saves "now" as happened_at instead of the model's updated_at field
- Added the
isEmpty()
andisNotEmpty()
methods to theDiff
class
- Fixed N+1 query by eager loading the user relationship when retrieving history
- Added the
ModelHistoryEvent::user(): BelongsTo
relationship - Added the
konekt.history.user_model
configuration to manually set the user class of the BelongsTo relationship
- Fixed possible
BadMethodCallException
by changing minimum Laravel version to v10.10.1 due toArr::mapWithKeys()
being present from that version
- Initial Release
- Log model creation, update, delete, and retrieval events
- Log model diffs
- Optional comments to events
- Comment-only history events
- Optionally define included/excluded fields on a per-model basis
- Detect the scenery of the event: Via (web, queue, cli) and depending on the context:
- IP, URL, user agent,
- artisan command name
- queue / job