useEcho
Composable for working with Echo isntance in your code.
By using this composable you can access the global object provided by the plugin and call any method to work with sockets on your backend.
Here is an example of a client component subscribing to the public and private channels:
components/Broadcast.client.vue
Keep in mind, for accessing Private and Presence channels you should have configured authentication on your backend side, preferably Laravel Sanctum.
Last updated