make:command

Create a new Artisan command

Options

  • force - Create the class even if the console command already exists Optional
  • command - The terminal command that will be used to invoke the class Optional
  • test - Generate an accompanying Test test for the Console command Optional
  • pest - Generate an accompanying Pest test for the Console command Optional
  • phpunit - Generate an accompanying PHPUnit test for the Console command Optional

Arguments

  • name - The name of the command Required
php artisan make:command [-f|--force] [--command [COMMAND]] [--test] [--pest] [--phpunit] [--] <name>