Installation & Setup
chorus:install
Install and set up Laravel Chorus with Reverb for WebSocket broadcasting.
- Publishes migrations, config files, and JavaScript resources
- Sets up Laravel Reverb for WebSocket broadcasting
- Configures broadcasting settings
- Prompts you to select your frontend framework (React, Vue, Svelte, or Vanilla JS)
- Installs the appropriate Chorus package for your chosen framework
- Creates the
resources/js/_generateddirectory with default schema
chorus:generate
Generate IndexedDB schema and TypeScript types from models that are using the Harmonics trait.
- Scans all models in the
app/Modelsdirectory - Identifies models using the
Harmonicstrait - Generates IndexedDB schema based on sync fields
- Creates a TypeScript schema file at
resources/js/_generated/schema.ts - Create generated types for sync fields at
resources/js/_generated/types.ts
any type.
Server Management
chorus:debug
Debug Chorus active channels and connections.
- Active WebSocket channels and their connection timestamps
- Active user IDs
- Debugging instructions for testing real-time updates
Code Generation
chorus:make-action
Create a new ChorusAction class for handling multi-table write operations.
App\Actions\ChorusActions namespace that extends the ChorusAction base class.
chorus:make-prefix-resolver
Create a new PrefixResolver class for channel prefixing.
App\Chorus\Resolvers namespace that implements the PrefixResolver contract.