diff --git a/src/Versionable.php b/src/Versionable.php index e4eb785..2d3fb9d 100644 --- a/src/Versionable.php +++ b/src/Versionable.php @@ -274,7 +274,7 @@ public function getVersionModel(): string public function getVersionUserId() { - return $this->getAttribute(\config('versionable.user_foreign_key')) ?? auth()->id(); + return auth()->id() ?? $this->getAttribute(\config('versionable.user_foreign_key')); } /**