Skip to content

Artisan commands

The package registers 72 Artisan commands. Each group has one page with the arguments, options and notes of every command. Open the group page for the shared behaviour of a group.

In a synopsis, <name> is a required argument, [<name>] an optional one, and ... marks an argument that takes several values. Options follow the arguments.

module:route-provider is a generator even though its name has no make- prefix. It is listed with the generators.

Commands that list, enable, disable, install, update and delete existing modules. Details: Module management commands.

Command Purpose
module:list Lists the modules with their status, priority and path.
module:enable Marks the given modules as enabled.
module:disable Marks the given modules as disabled.
module:delete Deletes the module directory and removes the module from the activator.
module:use Stores a module name as the module to use when a generator command gets no module argument.
module:unuse Forgets the module stored by module:use.
module:install Installs a module from Composer or from a Git repository, then runs module:update for it.
module:update Installs the Composer dependencies a module declares.
module:dump Runs composer dump -o -n -q inside each module directory.
module:list-commands Lists the Artisan command classes found in each module.
module:lang Compares the language directories of a module and reports missing files and keys.
module:prune Prunes the prunable Eloquent models of the given modules. It wraps Laravel model:prune.
module:model-show Shows information about an Eloquent model that lives in a module. It wraps Laravel model:show.

Commands that create a module or a file inside a module. Details: Generator commands.

Command Purpose
module:make Creates one or more modules: the folder structure, module.json, composer.json and the starting classes.
module:make-action Creates an action class in a module.
module:make-cast Creates an Eloquent cast class in a module.
module:make-channel Creates a broadcast channel class in a module.
module:make-class Creates a class of any type in a module. The type decides the folder.
module:make-command Creates an Artisan command class in a module.
module:make-component Creates a Blade component class and its view in a module.
module:make-component-view Creates a Blade component view in a module.
module:make-config Creates a configuration file in a module.
module:make-controller Creates a controller in a module.
module:make-enum Creates an enum in a module.
module:make-event Creates an event class in a module.
module:make-event-provider Creates the EventServiceProvider of a module.
module:make-exception Creates an exception class in a module.
module:make-factory Creates a model factory in a module.
module:make-helper Creates a helper class in a module.
module:make-health-indicator Creates a health indicator class for the actuator in a module.
module:make-inertia-component Creates an Inertia component in a module.
module:make-inertia-page Creates an Inertia page in a module.
module:make-interface Creates an interface in a module.
module:make-job Creates a queued job class in a module.
module:make-job-middleware Creates a job middleware class in a module.
module:make-listener Creates an event listener in a module.
module:make-mail Creates a mailable class in a module.
module:make-middleware Creates a middleware class in a module.
module:make-migration Creates a migration in a module.
module:make-model Creates an Eloquent model in a module, and optionally the files that go with it.
module:make-notification Creates a notification class in a module.
module:make-observer Creates a model observer in a module.
module:make-policy Creates a policy class in a module.
module:make-provider Creates a service provider in a module.
module:make-replacement Creates a replacement key class for stubs in a module.
module:make-repository Creates a repository class in a module.
module:make-request Creates a form request class in a module.
module:make-resource Creates an API resource class in a module.
module:make-rule Creates a validation rule in a module.
module:make-scope Creates an Eloquent scope class in a module.
module:make-seed Creates a database seeder in a module.
module:make-service Creates a service class in a module.
module:make-test Creates a test class in a module.
module:make-trait Creates a trait in a module.
module:make-view Creates a Blade view in a module.
module:route-provider Creates the RouteServiceProvider of a module.

Commands that run, roll back, reset, refresh and seed module migrations. Details: Database commands.

Command Purpose
module:migrate Runs the migrations of the given modules through Laravel migrate.
module:migrate-fresh Drops all tables of the database, then runs the application migrations and the migrations of the given modules.
module:migrate-refresh Resets and runs again the migrations of the given modules.
module:migrate-reset Rolls back every migration of the given modules that ran.
module:migrate-rollback Rolls back the last batch of migrations of the given modules.
module:migrate-status Shows which migrations of the given modules ran.
module:seed Runs the seeders of the given modules through Laravel db:seed.

Commands that copy module files to the application. Details: Publish commands.

Command Purpose
module:publish Copies the assets of a module to the public assets path.
module:publish-config Publishes the configuration files of a module to the application config directory.
module:publish-inertia Publishes the Inertia app.js entry file to resources/js/app.js.
module:publish-migration Copies the migrations of a module to the application migration path.
module:publish-translation Copies the language files of a module to the application lang directory.

Commands for setup, autoload rewriting, version 5 status migration and PHPUnit coverage. Details: Utility commands.

Command Purpose
module:setup Creates the modules directory and the public assets directory when they do not exist.
module:composer-update Rewrites the legacy autoload.psr-4 entry of a module composer.json so that the module namespace maps to the app folder.
module:v6:migrate Copies the active field of each module.json (the version 5 way to store the status) into the activator.
module:update-phpunit-coverage Syncs <source><include> in phpunit.xml with the app folders of enabled modules.