Automatically remember the user who created or updated #850
Labels
enhancement
A feature that exists, works as intended but needs to be improved
feature request
A feature that does not yet exist but will be a good addition to the library
It would be handy to have a quick way to include created_by and updated_by properties in the model that automatically store the user id of the user making the change. This would be similar to the timestamps mixin (which provides the created_at and updated_at properties) and would be set and updated similarly - created_by stored when initially creating the object and updated_by stored when touched or changed.
When using the SoftDeletes mixin (which adds the deleted_at property), it might also be nice to include the deleted_by property.
I started looking at doing this. I am trying to figure out how to identify the "current user" generically to the ORM. Perhaps this mixin would be better placed in Masonite? I think this could be valuable to anyone using the ORM, though.
The text was updated successfully, but these errors were encountered: