Update
parent
07e47ae294
commit
48140d5d9e
|
|
@ -365,7 +365,7 @@ class User extends Model implements AuthorizableContract, AuthenticatableContrac
|
|||
$user->userInfo()->create([
|
||||
'inviter_id' => $inviter?->id,
|
||||
'depth' => $depth + 1,
|
||||
'path' => Str::finish($inviter?->userInfo?->full_path, '/'),
|
||||
'path' => Str::finish($inviter?->userInfo?->full_path, '-'),
|
||||
]);
|
||||
|
||||
//初始化钱包
|
||||
|
|
|
|||
|
|
@ -385,8 +385,8 @@ class UserInfo extends Model
|
|||
*/
|
||||
public function getParentIdsAttribute(): array
|
||||
{
|
||||
if ($path = trim($this->path, '/')) {
|
||||
return explode('/', $path);
|
||||
if ($path = trim($this->path, '-')) {
|
||||
return explode('-', $path);
|
||||
}
|
||||
|
||||
return [];
|
||||
|
|
@ -424,7 +424,7 @@ class UserInfo extends Model
|
|||
*/
|
||||
public function getFullPathAttribute(): string
|
||||
{
|
||||
return Str::finish($this->path.$this->getKey(), '/');
|
||||
return Str::finish($this->path.$this->getKey(), '-');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue