We're a place where coders share, stay up-to-date and grow their careers.
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!
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!