Created
September 7, 2021 13:33
-
-
Save Ghostscypher/aaa02cb0786b53890c6b090e9f5959ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Support\Facades\Broadcast; | |
/* | |
|-------------------------------------------------------------------------- | |
| Broadcast Channels | |
|-------------------------------------------------------------------------- | |
| | |
| Here you may register all of the event broadcasting channels that your | |
| application supports. The given channel authorization callbacks are | |
| used to check if an authenticated user can listen to the channel. | |
| | |
*/ | |
// We are prefixing the channel name in this case app.name returns the channel name | |
Broadcast::channel(config('app.name') . '.{id}', function ($user, $id) { | |
return (int) $user->id === (int) $id; | |
}); | |
Broadcast::channel(config('app.name') . '.Public', function (){ | |
return true; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment