Creating a websocket system for third party users to connect to

170 views Asked by At

I'm currently in the process of creating a RESTful API secured by an OAuth authentication system using Laravel's passport package and I'm wanting to create some sort of websocket system to allow the third party clients to subscribe to a websocket channel and receive events for their authorized users. I'm currently looking at using the beyondcode/laravel-websockets package but I'm not sure how, on the third party side, the client could subscribe to channels to receive notifications about a specific user, would they just have to have multiple subscriptions to this endpoint?

Broadcast::channel('App.Models.Users.User.{id}', function ($user, $id) {
    return (int) $user->id === (int) $id;
});
0

There are 0 answers