user, 'receivesBroadcastNotificationsOn')) { return new PrivateChannel($this->user->receivesBroadcastNotificationsOn()); } $userClass = str_replace('\\', '.', $this->user::class); return new PrivateChannel("{$userClass}.{$this->user->getKey()}"); } public function broadcastAs(): string { return 'database-notifications.sent'; } }