Amazing!
@mankarsandesh thanks for sharing! by chance could you share the laravel side of this? An end to end example would be really helpful to me.
For backend channeling authentication you would have to specify that you are using Laravel sanctum like this, given I am using the api prefix I put this in routes/api.php:
Broadcast::routes(['middleware' => ['auth:sanctum']]);
And taking this route as example it should works:
Broadcast::channel('App.User.{id}', function ($user, $id) { return (int)$user->id === (int)$id; });
I hope this is the answer you were looking for
@eichgi I’ll have to give it a go - thanks for responding!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Amazing!
@mankarsandesh thanks for sharing! by chance could you share the laravel side of this? An end to end example would be really helpful to me.
For backend channeling authentication you would have to specify that you are using Laravel sanctum like this, given I am using the api prefix I put this in routes/api.php:
And taking this route as example it should works:
I hope this is the answer you were looking for
@eichgi I’ll have to give it a go - thanks for responding!