Fix
parent
61ce40b3dc
commit
c0e5a5817b
|
|
@ -392,12 +392,12 @@ class User extends Model implements AuthorizableContract, AuthenticatableContrac
|
|||
*/
|
||||
public static function create(array $attributes = [], ?self $inviter = null): self
|
||||
{
|
||||
$user = static::query()->create($attributes);
|
||||
|
||||
if ($inviter === null) {
|
||||
$inviter = static::find(1);
|
||||
}
|
||||
|
||||
$user = static::query()->create($attributes);
|
||||
|
||||
// 邀请人的深度
|
||||
$depth = (int) $inviter?->userInfo?->depth;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue