Skip to content

make:stubs ​

Selectively regenerate stub files for an existing route

Signature: modularous:make:stubs

Category: Make


Description ​

Re-runs stub generation for an existing module route without creating migrations or running them. Delegates to StubsGenerator which writes only the PHP class files whose stub types match the --only / --except filters. Use this to fix outdated controller or repository files after a config change.


Usage ​

modularous:make:stubs [options] <module> <route>

Arguments ​

ArgumentRequiredDescription
moduleyesTarget module
routeyesRoute name

Options ​

OptionShortDescription
--only=Comma-separated list of stub types to include
--except=Comma-separated list of stub types to exclude
--force-fOverwrite existing files
--fixFix model config errors

Examples ​

Regenerate all stubs for a route ​

bash
php artisan modularous:make:stubs Blog Post --force

Regenerate only the controller stubs ​

bash
php artisan modularous:make:stubs Blog Post --only=controller,controller-api

Regenerate all except migration ​

bash
php artisan modularous:make:stubs Blog Post --except=migration

Notes ​

  • Stub type names match the generator config keys (e.g. model, controller, repository, request, migration).
  • Use make:module --just-stubs to regenerate stubs across all routes of a module at once.

See also ​