diff --git a/broadcasting.md b/broadcasting.md index 9d7488f366a..fd7d66abfb5 100644 --- a/broadcasting.md +++ b/broadcasting.md @@ -844,6 +844,14 @@ If you plan to explicitly return a channel instance from your model's `broadcast return [new Channel($this->user)]; ``` +If you need access to the channel name of a model, you may use the `broadcastChannel()` method from any model instance: + +```php +$user->broadcastChannel() +``` + +This method returns the string `App.Models.User.1` for a `App\Models\User` model with an `id` of `1`. + #### Event Conventions