暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

channels.php 551B

123456789101112131415161718
  1. <?php
  2. use Illuminate\Support\Facades\Broadcast;
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Broadcast Channels
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here you may register all of the event broadcasting channels that your
  9. | application supports. The given channel authorization callbacks are
  10. | used to check if an authenticated user can listen to the channel.
  11. |
  12. */
  13. Broadcast::channel('App.User.{id}', function ($user, $id) {
  14. return (int) $user->id === (int) $id;
  15. });