archtechx / virtualcolumn

Eloquent Virtual Column package.
MIT License
70 stars 12 forks source link

Sync with original attributes #7

Closed stein-j closed 2 years ago

stein-j commented 2 years ago

When retrieving, virtual columns are added to the attributes array. This PR sync the value so it also shows the value in the original attribute array. When saving/updating/creating, the value is also unset from the original attribute array.

This allows the developer to use isDirty() or getDirty() if needed.

stancl commented 2 years ago

Looks good, thanks!