-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$revisionCreationsEnabled only tracks created_at #267
Comments
Same issue here using laravel 5.2 & revisionable 1.28. |
This could be an enhancement/additional option, but that is the expected behavior. When I've used it/tracked revisions in the past, I can assume that that the "created_at" indicates when it was created, and then any revision after that is a modification. My revert functionality will take the current record and traverse backward down the revisions to get to the "original". I agree that that is extra work (and also has the caveat if you don't record certain columns). |
I have created -and closed- this issue because I didn't see this other. If is needed to record all fields it could be done overriding boot method and using the static saving or saved method to create a new record in revisions table. |
This issue can be closed, isn't it ? |
same here |
still exists |
I have implemented the below on the model's boot method to store the starting values for fields I need
|
Hi, I just installed revisionable in a Laravel 5.3 project.
In my models I set
$revisionCreationsEnabled = true
. When I create a record (through Eloquent), only keycreated_at
gets stored in the revisions table.Shouldn't it save any model property?
If my model has 3 properties, let's say
$name, $description, $state
, when I create a record I'm expecting to see 3 rows (3 keys) in therevisions
table, one for each model property. Am I wrong?Thank you.
The text was updated successfully, but these errors were encountered: