Skip to content

Commit d6b94e8

Browse files
authored
Add update for command registration (#249)
Fixes wintercms/winter#1401
1 parent 8b0b032 commit d6b94e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

console/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,10 +462,10 @@ class MyPlugin extends PluginBase
462462
}
463463
```
464464

465-
Alternatively, plugins can supply a file named **init.php** in the plugin directory that you can use to place command registration logic. Within this file, you could use the `Artisan::add` method to register the command:
465+
Alternatively, plugins can supply a file named **init.php** in the plugin directory that you can use to place command registration logic. Within this file, you could use the `Artisan::registerCommand` method to register the command:
466466

467467
```php
468-
Artisan::add(new MyAuthor\MyPlugin\Console\MyCommand);
468+
Artisan::registerCommand(new \MyAuthor\MyPlugin\Console\MyCommand());
469469
```
470470

471471
### Registering a command in the application container

0 commit comments

Comments
 (0)