Generators
Generators are an easy and fast way to create a new file from a predefined template. Modular comes with a set of command generators that will help you create common files for your application.
All Modular generators are Command Line Interface (CLI) commands and can be executed from the root of your application, under the namespace modular
. For example, to create a new Module, you can run the following command:
bash
php artisan modular:make-module Customer
Available Generators
Here is a list of all the available generators:
- Module Generator Create a new Module
- Component Generator Create a Vue Component for the Module
- Composable Generator Create a Vue Composable for the Module
- Controller Generator Create a new controller class for a Module
- Model Generator Create a new model class for a Module
- Page Generator Create the fronted page structure for CRUD operations of a Module
- Route Generator Create a new route file for a Module
- Service Generator Create a new service class for a Module
- Test Generator Create a new test file for a Module
- HTTP Request Validate Generator Create a new HTTP Request Validate file for a Module