TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/internachi/modular/llms.txt
Use this file to discover all available pages before exploring further.
ArtisanPlugin automatically discovers and registers Artisan console commands from all enabled modules. It also configures Laravel Tinker to include module namespaces.
Overview
This plugin scans each module’ssrc/Console/Commands directory for command classes and registers them with Laravel’s Artisan console. It executes during Artisan’s startup process.
Source Location
InterNACHI\Modular\Plugins\ArtisanPlugin
How It Works
1. Boot Process
The plugin hooks into Artisan’s starting event:2. Discovery Phase
Thediscover() method finds all command classes in modules:
The plugin only registers commands that:
- Extend
Illuminate\Console\Command - Are not abstract classes
3. Registration Phase
Thehandle() method registers discovered commands:
Tinker Integration
The plugin automatically configures Laravel Tinker to include module namespaces:Test, factory, and seeder namespaces are automatically excluded from Tinker aliases to keep the REPL environment clean.
Expected Module Structure
For commands to be discovered, they must be located in:Example Command
php artisan your-module:action.
Dependencies
Illuminate\Console\Application- Artisan consoleInterNACHI\Modular\Support\ModuleRegistry- Module registryInterNACHI\Modular\Support\FinderFactory- File discovery