Skip to content

Conversation

@julioccorreia
Copy link

This PR adds a new "Events" section to the Reverb documentation. It details the internal events dispatched by the server (such as ChannelCreated, ChannelRemoved, MessageReceived, etc.) and provides examples of how to listen to them using standard Laravel listeners.

While integrating Reverb, I needed to perform specific actions during the channel opening and closing lifecycle.

I noticed that the current documentation does not explicitly mention that Reverb dispatches these internal events. This lack of visibility has led to some confusion in the community. For instance, in Issue #185, developers were discussing complex workarounds—such as extending the core Server class—to manually dispatch events, unaware that Reverb already handles this natively.

By documenting these events, we can encourage best practices and prevent developers from overwriting core classes unnecessarily.

Related discussion: laravel/reverb#185

@TarsisioXavier
Copy link

This is nice, it's not very clear for new developers the option to listen this events coming from Reverb.

@fernando-vieirajr
Copy link

This proposal is very useful. The current Laravel documentation lacks specific details, and clarifying them would significantly improve developers’ understanding. In practice, working with Reverb events has been particularly challenging due to the absence of clear and detailed guidance.

@GabeSilvaDev
Copy link

Great addition to the docs. Making these Reverb events explicit helps a lot when building more advanced real-time features and removes a lot of guesswork for developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants