Laravel

soketi

Hi there, i am trying to create a soketi server in my machine. All examples i have found are for laravel MIX and the newest versions use VITE. is there any information any of you can point me out for the Env, and boostrap configuration directions? thanks for your help

robert58205
robert58205
0
1
335
Haz
Haz
Moderator

Hello,

Just prefix them with VITE_ instead.

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
 
window.Pusher = Pusher;
 
window.Echo = new Echo({
    broadcaster: 'pusher',
    key: import.meta.env.VITE_PUSHER_APP_KEY,
    cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER,
    forceTLS: true
});

Client Side Installation

Hope this helps.