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.
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.