<?php

return [

    'default' => env('BROADCAST_CONNECTION', 'reverb'),

    'connections' => [

        'reverb' => [
            'driver'  => 'reverb',
            'key'     => env('REVERB_APP_KEY'),
            'secret'  => env('REVERB_APP_SECRET'),
            'app_id'  => env('REVERB_APP_ID'),
            'options' => [
                /*
                 * REVERB_SERVER_HOST is the host PHP uses to publish events to the Reverb process.
                 * It must be 127.0.0.1 (loopback) — NOT 0.0.0.0 (which is the server's bind address).
                 * REVERB_HOST (0.0.0.0) is only used in config/reverb.php for the listen address.
                 */
                'host'   => env('REVERB_SERVER_HOST', '127.0.0.1'),
                'port'   => env('REVERB_PORT', 8080),
                'scheme' => 'http',   // PHP connects locally — always plain HTTP
                'useTLS' => false,
            ],
            'client_options' => [],
        ],

        'pusher' => [
            'driver'  => 'pusher',
            'key'     => env('PUSHER_APP_KEY'),
            'secret'  => env('PUSHER_APP_SECRET'),
            'app_id'  => env('PUSHER_APP_ID'),
            'options' => [
                'host'    => env('PUSHER_HOST'),
                'port'    => env('PUSHER_PORT', 443),
                'scheme'  => env('PUSHER_SCHEME', 'https'),
                'useTLS'  => env('PUSHER_SCHEME', 'https') === 'https',
                'cluster' => env('PUSHER_APP_CLUSTER', 'mt1'),
            ],
            'client_options' => [],
        ],

        'log'  => ['driver' => 'log'],
        'null' => ['driver' => 'null'],

    ],

];
