Skip to content

Route Disable ​

Disable a specific route within a module without removing the module itself.

Command Information ​

  • Signature: modularous:route:disable {module} {route}
  • Category: Module

Arguments ​

ArgumentRequiredDescription
moduleYesThe module name (e.g. Blog)
routeYesThe route name to disable (e.g. posts)

What It Does ​

Looks up the module, checks whether the route is currently enabled, and calls $module->disableRoute($route) to deactivate it. If the route is already disabled, a notice is printed but no error is thrown.

Disabled routes are excluded from the router registration on the next request, effectively making them inaccessible without code changes.

Examples ​

bash
php artisan modularous:route:disable Blog posts
php artisan modularous:route:disable Shop api-products