laravel-versionable icon indicating copy to clipboard operation
laravel-versionable copied to clipboard

⏱️Make Laravel model versionable

Results 13 laravel-versionable issues
Sort by recently updated
recently updated
newest added

I don't really want to track `updated_at`, so I added it to the `$dontVersionable` variable in the model, however when calling the `diff()` method it gives me the following error:...

Wondering on your thoughts about locking certain versions so they can never be deleted unless they become unlocked? For example we are using versionable for contracts so they can be...

First of all thanks for creating this package. Love how simple and useful it is! ❤️ I would like to propose a change in how version author is stored. At...

enhancement
todo :spiral_notepad:

Is it possible to show rich text content without the html tags? I have to compare a content field from a rich text editor.

I have uuid = true and when I get data from the model 'id' is cast to int. Adding it to Version.php solves the problem ```php protected $casts = [...

Versions >4.4 have a merged commit which introduced a breaking change (with tests not passing with the breaking change). An example is found in the Feature test `post_can_revert_to_target_version` In the...

Hello! Package version 4. public function getVersionUserId() { return auth()->id() ?? $this->getAttribute(\config('versionable.user_foreign_key')); } Package version 5. ``` public function getVersionUserId() { return $this->getAttribute($this->getUserForeignKeyName()) ?? auth()->id(); } ``` Is method correct...

Revert not work $post->getVersion(3)->revert(); $post->revertToVersion(3); without comment out when VersionStrategy::DIFF // if (! empty($this->contents)) { // $this->versionable->setRawAttributes(array_merge($original, $this->contents)); // } ``` public function revertWithoutSaving(): ?Model { $original = $this->versionable->getRawOriginal(); switch...

Is it possible to use the casts? for example we have some values stores encrypted and it would make sense to on parse check and use the casts where displaying...

Laravel model casts are not working when using `->diff()`. Example code: ```php $diff = $post->getVersion(1)->diff($post->getVersion(2)); $diff->toArray(); ``` Both the old and new values don't respect model casts and show the...