Appearance
mm:install Command
Description
The mm:install
command is used to install and set up the Module Manager system, or to install and configure specific modules within the application.
Syntax
shell
php artisan mm:install [modules...]
Usage Scenarios
1. Initial Module Manager Setup
When run without arguments on a fresh installation:
shell
php artisan mm:install
This will:
- Publish module manager configuration files
- Publish Laravel Modules service provider configuration
- Publish Langfy configuration
- Create
UserInteractsWithModules
trait - Create
TenantInteractsWithModules
trait
2. Module Installation
When run with module names:
shell
php artisan mm:install UserModule ProductModule
Module Installation Flow
For each specified module, the command performs the following operations:
- Module Enabling: Enables the module in the system
- NPM Package Installation: Installs JavaScript dependencies (if defined)
- Migration Execution: Runs database migrations with user confirmation
- Policy Generation: Generates policies for the module with user confirmation
- Permission Generation: Generates permissions for module models with user confirmation