different names in different dynamics
This commit is contained in:
@@ -49,6 +49,13 @@ class User extends Authenticatable implements PasskeyUser
|
||||
return $this->hasMany(ReadCursor::class);
|
||||
}
|
||||
|
||||
public function displayNameFor(Dynamic $dynamic): string
|
||||
{
|
||||
$participant = $dynamic->participants()->where('user_id', $this->id)->first();
|
||||
|
||||
return $participant?->pivot?->display_name ?? $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user