File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ private static function createVersionForModel(Model $model): void
4646
4747 public function versions (): MorphMany
4848 {
49- return $ this ->morphMany (\config ( ' versionable.version_model ' ), 'versionable ' );
49+ return $ this ->morphMany ($ this -> getVersionModel ( ), 'versionable ' );
5050 }
5151
5252 public function lastVersion (): MorphOne
@@ -56,12 +56,12 @@ public function lastVersion(): MorphOne
5656
5757 public function latestVersion (): MorphOne
5858 {
59- return $ this ->morphOne (\config ( ' versionable.version_model ' ), 'versionable ' )->latest ('id ' );
59+ return $ this ->morphOne ($ this -> getVersionModel ( ), 'versionable ' )->latest ('id ' );
6060 }
6161
6262 public function firstVersion (): MorphOne
6363 {
64- return $ this ->morphOne (\config ( ' versionable.version_model ' ), 'versionable ' )->oldest ('id ' );
64+ return $ this ->morphOne ($ this -> getVersionModel ( ), 'versionable ' )->oldest ('id ' );
6565 }
6666
6767 public function getVersion (int $ id ): ?Version
You can’t perform that action at this time.
0 commit comments