Overview
Themake:wirechat-panel command creates a new panel provider class that allows you to configure isolated chat instances with different settings, routes, and permissions.
Command Signature
Arguments
The panel identifier (e.g.,
admin, support, team). If not provided, you’ll be prompted to enter it.Requirements:- Must start with a letter
- Can contain only letters, numbers, and underscores
- Maximum 255 characters
- Will be automatically converted to kebab-case
What It Does
Generate Provider Class
Creates a panel provider class in
app/Providers/Wirechat/ with the name {PanelId}PanelProvider.php.Register Provider
Automatically registers the provider in
bootstrap/providers.php (Laravel 11+) or config/app.php (Laravel 10 and below).Interactive Prompts
Panel ID Input
If you don’t provide the panel ID as an argument:Overwrite Existing File
If a panel provider with the same name already exists:Examples
Create Admin Chat Panel
Create Support Chat Panel
app/Providers/Wirechat/SupportPanelProvider.php:
Interactive Panel Creation
Panel ID Validation
The command validates panel IDs with the following rules:Error Messages
Invalid Panel ID Format
Missing Stub File
Provider Registration Failed
If the provider file was created but registration failed, the command will automatically delete the generated file to maintain a clean state.
Post-Creation Steps
After creating a panel:-
Customize the panel provider:
-
Access your panel at
/admin/chats(or your configured path) - Configure panel-specific settings like middleware, guards, and colors
Laravel Version Compatibility
Providers are registered in
bootstrap/providers.phpProviders are registered in
config/app.php in the providers arraySource Reference
Command implementation:~/workspace/source/src/Console/Commands/MakePanelCommand.php:17