Skip to content

Make Stubs ​

Generate or regenerate the stub files (views, JS, config) for a module route.

Command Information ​

  • Signature: modularous:make:stubs {module} {route} [--only=] [--except=] [--force] [--fix]
  • Category: Generators

Arguments ​

ArgumentRequiredDescription
moduleYesThe module name (e.g. Blog)
routeYesThe route name within the module (e.g. posts)

Options ​

OptionDescription
--only=Comma-separated list of stub types to generate (e.g. view,js)
--except=Comma-separated list of stub types to skip
--forceOverwrite files that already exist
--fixFix model config errors instead of generating fresh files

What It Does ​

Delegates to StubsGenerator, which writes the Blade views, Vue page components, and supporting config files for the specified module/route combination. Use --only or --except to regenerate a subset of stubs after manual edits to avoid overwriting customised files.

Examples ​

bash
# Generate all stubs for Blog/posts
php artisan modularous:make:stubs Blog posts

# Regenerate only the view stubs, overwriting existing
php artisan modularous:make:stubs Blog posts --only=view --force

# Regenerate everything except the JS stubs
php artisan modularous:make:stubs Blog posts --except=js

# Fix config errors without regenerating
php artisan modularous:make:stubs Blog posts --fix