Configuration

The CLI tool uses minimal configuration, auto-detecting plugin settings from composer.json.

Namespace Detection

The tool reads your PSR-4 autoload configuration:

{
  "autoload": {
    "psr-4": {
      "MyPlugin\\": "app/"
    }
  }
}

Generated files will use the detected namespace.

Output Directories

Default output directories (relative to your plugin root):

CommandDefault Path
make:controllerapp/Http/Controllers/
make:requestapp/Http/Requests/
make:migrationdatabase/migrations/

Stub Customization

To customize generated code, you can override the default stubs.

Creating Custom Stubs

  1. Create a stubs/ directory in your plugin root:
my-plugin/
+-- stubs/
—   +-- controller.stub
—   +-- request.stub
—   +-- migration.stub
  1. Copy the default stubs and modify as needed.

Stub Tokens

Available tokens for replacement:

TokenDescription
{{namespace}}PHP namespace
{{class}}Class name
{{slug}}Plugin slug
{{prefix}}Database prefix
{{textDomain}}Text domain
{{table}}Table name (migrations)

Environment Variables

No environment variables are required. The tool works out of the box.