broadcasting.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /*
  3. * This file is part of the Jiannei/lumen-api-starter.
  4. *
  5. * (c) Jiannei <longjian.huang@foxmail.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. return [
  11. /*
  12. |--------------------------------------------------------------------------
  13. | Default Broadcaster
  14. |--------------------------------------------------------------------------
  15. |
  16. | This option controls the default broadcaster that will be used by the
  17. | framework when an event needs to be broadcast. You may set this to
  18. | any of the connections defined in the "connections" array below.
  19. |
  20. | Supported: "pusher", "redis", "log", "null"
  21. |
  22. */
  23. 'default' => env('BROADCAST_DRIVER', 'null'),
  24. /*
  25. |--------------------------------------------------------------------------
  26. | Broadcast Connections
  27. |--------------------------------------------------------------------------
  28. |
  29. | Here you may define all of the broadcast connections that will be used
  30. | to broadcast events to other systems or over websockets. Samples of
  31. | each available type of connection are provided inside this array.
  32. |
  33. */
  34. 'connections' => [
  35. 'pusher' => [
  36. 'driver' => 'pusher',
  37. 'key' => env('PUSHER_APP_KEY'),
  38. 'secret' => env('PUSHER_APP_SECRET'),
  39. 'app_id' => env('PUSHER_APP_ID'),
  40. 'options' => [
  41. 'cluster' => env('PUSHER_APP_CLUSTER'),
  42. 'encrypted' => true,
  43. ],
  44. ],
  45. 'redis' => [
  46. 'driver' => 'redis',
  47. 'connection' => env('BROADCAST_REDIS_CONNECTION', 'default'),
  48. ],
  49. 'log' => [
  50. 'driver' => 'log',
  51. ],
  52. 'null' => [
  53. 'driver' => 'null',
  54. ],
  55. ],
  56. ];