From 13e8027583808013b694b5ab1c9d143692d96581 Mon Sep 17 00:00:00 2001 From: Jack Wilkinson <31214002+jaxwilko@users.noreply.github.com> Date: Wed, 10 Sep 2025 22:00:36 +0100 Subject: [PATCH] Add update for command registration --- console/introduction.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/console/introduction.md b/console/introduction.md index a946e5e1..fac93f00 100644 --- a/console/introduction.md +++ b/console/introduction.md @@ -462,10 +462,10 @@ class MyPlugin extends PluginBase } ``` -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: +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: ```php -Artisan::add(new MyAuthor\MyPlugin\Console\MyCommand); +Artisan::registerCommand(new \MyAuthor\MyPlugin\Console\MyCommand()); ``` ### Registering a command in the application container