Skip to content

Commit f6b8d76

Browse files
authored
调整 Versionable Trait 中 getVersionUserId 方法逻辑策略 (#35)
1 parent 3893bc0 commit f6b8d76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Versionable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public function getVersionModel(): string
274274

275275
public function getVersionUserId()
276276
{
277-
return $this->getAttribute(\config('versionable.user_foreign_key')) ?? auth()->id();
277+
return auth()->id() ?? $this->getAttribute(\config('versionable.user_foreign_key'));
278278
}
279279

280280
/**

0 commit comments

Comments
 (0)