Tweak a few broadcasting configurations.

This commit is contained in:
Taylor Otwell
2016-08-05 15:44:29 -05:00
parent 5fad3768cb
commit 9df814e512
3 changed files with 11 additions and 4 deletions

View File

@@ -16,8 +16,11 @@ class BroadcastServiceProvider extends ServiceProvider
{
Broadcast::routes();
Broadcast::auth('example.*', function ($user, $exampleId) {
return true;
/**
* Authenticate the user's personal channel...
*/
Broadcast::auth('App.User.*', function ($user, $userId) {
return (int) $user->id === (int) $userId;
});
}
}