PhyrePanel-mirror/web/config/broadcasting.php

73 lines
2.3 KiB
PHP
Raw Normal View History

2024-04-22 11:14:05 +00:00
<?php
2024-05-10 16:01:21 +00:00
use App\PhyreConfig;
2024-04-22 11:14:05 +00:00
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "ably", "redis", "log", "null"
|
*/
2024-05-10 16:01:21 +00:00
'default' => PhyreConfig::get('BROADCAST_DRIVER', 'null'),
2024-04-22 11:14:05 +00:00
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
2024-05-10 16:01:21 +00:00
'key' => PhyreConfig::get('PUSHER_APP_KEY'),
'secret' => PhyreConfig::get('PUSHER_APP_SECRET'),
'app_id' => PhyreConfig::get('PUSHER_APP_ID'),
2024-04-22 11:14:05 +00:00
'options' => [
2024-05-10 16:01:21 +00:00
'cluster' => PhyreConfig::get('PUSHER_APP_CLUSTER'),
'host' => PhyreConfig::get('PUSHER_HOST') ?: 'api-'.PhyreConfig::get('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => PhyreConfig::get('PUSHER_PORT', 443),
'scheme' => PhyreConfig::get('PUSHER_SCHEME', 'https'),
2024-04-22 11:14:05 +00:00
'encrypted' => true,
2024-05-10 16:01:21 +00:00
'useTLS' => PhyreConfig::get('PUSHER_SCHEME', 'https') === 'https',
2024-04-22 11:14:05 +00:00
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
],
],
'ably' => [
'driver' => 'ably',
2024-05-10 16:01:21 +00:00
'key' => PhyreConfig::get('ABLY_KEY'),
2024-04-22 11:14:05 +00:00
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];