Closed chegmarco1989 closed 1 year ago
Hi, Only websocket was there earlier before to replace pusher @RTippin bro confirm whether it will be replaced.
Hi @darkfrozenfire and thanks for replying.
How to use and install websocket instead of Pusher in that Messenger-Demo (https://github.com/RTippin/messenger-demo) ???
Hope your answer ???!!!
@chegmarco1989 This core backend package, rtippin/messenger
is configurable with any broadcast driver that laravel supports, as I only configure the channel names and broadcast auth endpoints, but the consuming app can use any driver
.
My optional frontend UI package, rtippin/messenger-ui
is only setup to import pusherjs, thus I document how to use pusher or laravel-websockets in its readme:
https://github.com/RTippin/messenger-ui/blob/master/README.md#using-laravel-websockets
If you want to use something other than pusherjs, you may fork the frontend, edit the necessary JS, and re-compile the assets to publish within your app. Unfortunately, I have no plans right now to change anything in my messenger* packages until I find the time to dedicate to version 2.
Hi all especially @RTippin and @darkfrozenfire .
But I'm confusing about how to setup .env
file:
.env keys for both laravel-websockets and our UI
BROADCAST_DRIVER= ???
PUSHER_APP_ID= ???
PUSHER_APP_KEY= ???
PUSHER_APP_SECRET= ???
MESSENGER_SOCKET_HOST= ???
MESSENGER_SOCKET_KEY="???"
How to set these above informations if I don't want to use or use anymore Pusher ??? Please explain me how to use them with Websocket informations ??? Could you give an example for using them with Websocket ???
If I put anything there, will it make the Websocket work or do I necessarily have to have an account on Pusher to fill in this information afterwards (But since Pusher is no longer necessary) ???
Please, I really need your help.
@chegmarco1989 Please refer to the official Laravel docs and app skeleton to see what those values reference.
https://laravel.com/docs/10.x/broadcasting https://github.com/laravel/laravel/blob/f419821bd8cbc736ac6f9b2fce75a4e373a4b49f/config/broadcasting.php#L33-L67
The config values in my messenger-ui
simply forward their values to the view file to inject into the notifymanager js file I linked in my earlier reply.
https://github.com/RTippin/messenger-ui/blob/master/resources/views/scripts.blade.php#L33-L48
Thanks @RTippin But I'm still confuse.
I just want to know if YES, it is necessarily to create an account on Pusher.com if I decided to use Websoket ??? Or if NO, it is not necessarily and I can put there anything which not from Pusher.com ???
If you use laravel-websockets
package, then no, you do not need an official pusher account. It is a drop-in replacement for the real pusher. My tippindev.com
demo is using laravel-websockets and not pusher.com. For that, you are making up your own app credentials to fill in for the pusher driver. Please see the readme I linked above from the messenger-ui repo above, as it explains what you need to change when installing laravel-websockets
Thanks for all. Great thanks
hELLO.
Is there any way to use that Script without "Pusher" but just with an Open Source Project THAT COULD REPLACE "Pusher" ???
Please, answer. Awaiting your answer.