broadcasting.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Broadcaster
  6. |--------------------------------------------------------------------------
  7. |
  8. | This option controls the default broadcaster that will be used by the
  9. | framework when an event needs to be broadcast. You may set this to
  10. | any of the connections defined in the "connections" array below.
  11. |
  12. | Supported: "pusher", "ably", "redis", "log", "null"
  13. |
  14. */
  15. 'default' => env('BROADCAST_DRIVER', 'null'),
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Broadcast Connections
  19. |--------------------------------------------------------------------------
  20. |
  21. | Here you may define all of the broadcast connections that will be used
  22. | to broadcast events to other systems or over websockets. Samples of
  23. | each available type of connection are provided inside this array.
  24. |
  25. */
  26. 'connections' => [
  27. 'reverb' => [
  28. 'driver' => 'reverb',
  29. 'key' => env('REVERB_APP_KEY'),
  30. 'secret' => env('REVERB_APP_SECRET'),
  31. 'app_id' => env('REVERB_APP_ID'),
  32. 'options' => [
  33. 'host' => env('REVERB_HOST'),
  34. 'port' => env('REVERB_PORT', env('REVERB_SCHEME', 'https') === 'https' ? 443 : 80),
  35. 'scheme' => env('REVERB_SCHEME', 'https'),
  36. 'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
  37. ...(env('REVERB_PATH', '') ? [
  38. 'base_path' => env('REVERB_PATH').'/apps/'.env('REVERB_APP_ID'),
  39. ] : []),
  40. ],
  41. 'client_options' => [
  42. // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
  43. ],
  44. ],
  45. 'pusher' => [
  46. 'driver' => 'pusher',
  47. 'key' => env('PUSHER_APP_KEY'),
  48. 'secret' => env('PUSHER_APP_SECRET'),
  49. 'app_id' => env('PUSHER_APP_ID'),
  50. 'options' => [
  51. 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
  52. 'port' => env('PUSHER_PORT', 443),
  53. 'scheme' => env('PUSHER_SCHEME', 'https'),
  54. 'encrypted' => true,
  55. 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
  56. ],
  57. 'client_options' => [
  58. // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
  59. ],
  60. ],
  61. 'ably' => [
  62. 'driver' => 'ably',
  63. 'key' => env('ABLY_KEY'),
  64. ],
  65. 'redis' => [
  66. 'driver' => 'redis',
  67. 'connection' => 'default',
  68. ],
  69. 'log' => [
  70. 'driver' => 'log',
  71. ],
  72. 'null' => [
  73. 'driver' => 'null',
  74. ],
  75. ],
  76. ];