Move broadcast channel registration to a routes file.
These are very similar to routes in that they are channel endpoints that your application supports and they also fully support route model binding in Laravel 5.4. Upgraded applications do not need to make this change if they do not want to.
This commit is contained in:
@@ -16,11 +16,6 @@ class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
Broadcast::routes();
|
||||
|
||||
/*
|
||||
* Authenticate the user's personal channel...
|
||||
*/
|
||||
Broadcast::channel('App.User.{userId}', function ($user, $userId) {
|
||||
return (int) $user->id === (int) $userId;
|
||||
});
|
||||
require base_path('routes/channels.php');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user