Skip to content

Module Commands ​

Manage the lifecycle of a module and the routes inside it. These commands correspond to the PHP classes under src/Console/Module/ and cover creation fix-ups, removal, and per-route enable/disable controls.

CommandSignatureDescription
fix-modulemodularous:fix:modulePatch a module's config file after scaffolding changes (add translation, media, file, position, slug, price, authorized, filepond, uuid, snapshot)
remove-modulemodularous:remove:moduleCompletely remove a module — roll back its migrations and delete its files
route:enablemodularous:route:enableRe-enable a previously disabled route within a module
route:disablemodularous:route:disableDisable a single route without removing the module
route:statusmodularous:route:statusList route enable/disable status per module

Common Workflows ​

Toggle a route off without losing its data ​

bash
php artisan modularous:route:disable Blog posts
php artisan modularous:route:status

Use route:disable to deactivate a route; its records and migrations stay intact. Re-enable with route:enable when ready.

Fix config drift after scaffolding ​

When a generator adds a new feature (translation, media, file, etc.) but the module config hasn't been updated, run:

bash
php artisan modularous:fix:module Blog posts --addTranslation --addMedia

See fix-module for the full option list.

Completely remove a module ​

bash
php artisan modularous:remove:module Blog

Destructive

remove-module rolls back migrations and deletes the module directory. There is no undo.