优惠券小程序

channels.php 561B

12345678910111213141516171819
  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.Models.SysUser.{id}', function ($user, $id) {
  14. return (int) $user->id === (int) $id;
  15. });