Skip to main content

Channel Prefixes

Channel prefixes enable multi-tenant architecture in Laravel Chorus by isolating WebSocket channels and data streams between different organizational units, teams, or tenants.

What are Channel Prefixes?

Channel prefixes modify WebSocket channel names to create isolated data streams:
This ensures users only receive data relevant to their context and provides complete data isolation between tenants.

Basic Configuration

Enable Channel Prefixes

Configure a prefix resolver in config/chorus.php:

Frontend Configuration

Pass the channel prefix to your frontend:

Creating Prefix Resolvers

Simple Tenant Resolver

Channel Structure Examples

Basic Tenant Isolation

Project-Based Channels

Next Steps

Getting started

Optimize Chorus for large-scale applications

Channel prefixes are essential for building scalable, multi-tenant applications with Laravel Chorus. Proper implementation ensures data isolation, security, and optimal performance across different organizational contexts.