Commands
php <file>.php <command>:<category> <param>
Structure
Categories
Categories are the options after the colon, used for example in a controller creation command make:controller, where the category would be "controller".
Parameter
The parameter is the last argument, important to differentiate controller names, for example, make:controller UserController, the parameter will be "UserController".
Values
The values are the attributes we create in your command class.
- $name -> Command name; this is the value we use in the terminal, in the example, we will use "hello" to run the command.
- $description -> Command description; this is the message that will appear in the command list (help).
- $paramRequired -> Whether the parameter is required.
- $categoryRequired -> Whether the category is required.
- $categoriesTrusted -> Which categories are accepted; leaving the array empty, any category is accepted.