How to use the laravel-echo.default function in laravel-echo

To help you get started, we’ve selected a few laravel-echo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vaibhavpandeyvpz / deapk / resources / js / bootstrap.js View on Github external
window.$ = window.jQuery = require('jquery');
require('popper.js');
require('bootstrap');
const Echo = require('laravel-echo').default;
window.Pusher = require('pusher-js');

$.ajaxSetup({
    headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
});

window.Echo = new Echo({
    broadcaster: 'pusher',
    cluster: process.env.MIX_PUSHER_APP_CLUSTER,
    encrypted: true,
    key: process.env.MIX_PUSHER_APP_KEY
});

laravel-echo

Laravel Echo library for beautiful Pusher and Socket.IO integration

MIT
Latest version published 10 days ago

Package Health Score

86 / 100
Full package analysis

Popular laravel-echo functions