1+ [ ![ run-tests] ( https://github.com/visualbuilder/versionable/actions/workflows/run-tests.yml/badge.svg?branch=1.x )] ( https://github.com/visualbuilder/versionable/actions/workflows/run-tests.yml )
2+
13# Laravel Versionable (Polymorphic User Fork)
24
35** Fork of [ overtrue/laravel-versionable] ( https://github.com/overtrue/laravel-versionable ) with polymorphic user support**
@@ -10,7 +12,7 @@ It's a minimalist way to make your model support version history, and it's very
1012
1113This fork replaces the single-user foreign key relationship with a ** polymorphic relationship** , enabling:
1214
13- - Support for multiple user model types (Admin, Associate, EndUser , etc.)
15+ - Support for multiple user model types (Admin, Associate, OrganisationUser , etc.)
1416- Automatic tracking of which user type created each version
1517- Compatibility with applications using multiple authentication guards
1618- No configuration needed - uses ` auth()->user() ` to automatically detect the authenticated user
@@ -37,23 +39,7 @@ This fork replaces the single-user foreign key relationship with a **polymorphic
3739
3840## Installing
3941
40- Add the package to your ` composer.json ` :
41-
42- ``` json
43- {
44- "repositories" : [
45- {
46- "type" : " path" ,
47- "url" : " ../packages/visualbuilder/versionable"
48- }
49- ],
50- "require" : {
51- "visualbuilder/versionable" : " *"
52- }
53- }
54- ```
55-
56- Then run:
42+ Run:-
5743
5844``` shell
5945composer require visualbuilder/versionable
@@ -96,7 +82,7 @@ class Post extends Model
9682}
9783```
9884
99- Versions will be created on the vensionable model saved.
85+ Versions will be created on the versionable model saved.
10086
10187``` php
10288$post = Post::create(['title' => 'version1', 'content' => 'version1 content']);
0 commit comments