Laravel - Broadcasting - Namespaces

You may have noticed in the examples above that we did not specify the full App\Events namespace for the event classes. This is because Echo will automatically assume the events are located in the App\Events namespace. However, you may configure the root namespace when you instantiate Echo by passing a namespace configuration option:

    
    window.Echo = new Echo({
        broadcaster: 'pusher',
        // ...
        namespace: 'App.Other.Namespace'
    });
	

Alternatively, you may prefix event classes with a . when subscribing to them using Echo. This will allow you to always specify the fully-qualified class name:

    
    Echo.channel('orders')
        .listen('.Namespace\\Event\\Class', (e) => {
            //
        });