I can see in the example code provided in your documentation you have used something similar a lot:
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
'host' => '127.0.0.1',
'port' => 6001,
'scheme' => 'http'
],
],
and:
import Echo from "laravel-echo"
window.Pusher = require('pusher-js');
window.Echo = new Echo({
broadcaster: 'pusher',
key: 'your-pusher-key',
wsHost: window.location.hostname,
wsPort: 6001,
disableStats: true,
});
So do I still need a PUSHER_APP_SECRET or PUSHER_APP_ID or PUSHER_APP_CLUSTER or pusher-key for this to work?!
You can generate every secret you want :) You don't need a Pusher Account anymore.
You can generate every secret you want :) You don't need a Pusher Account anymore.
Sorry if this is too much basic. But my understanding is pusher secret, app id, key are generated on Pusher. So are you saying, to use this websocket module, I don't need to define key, secret or app id?
I say you don't need to use a secret from pusher. You can generate every string you want :)
Thanks for that 馃憤
@mathewparet Did using random strings work for you?
@BenQoder check out https://docs.beyondco.de/laravel-websockets/1.0/getting-started/installation.html
There are the "random strings" defined. They're not totally random as in you can put in anything in the client, but are defined in websockets.php and can be anything you wish. As long as you use the PUSHER_* settings in your .env they will both be set in websockets.php and services.php and set everything correctly.
So if you follow along the installation you can set any random string it it will just work 鈩笍
Its not obvious from the docs
Most helpful comment
Its not obvious from the docs