fix message text for enabling/disabling plugin

at artisan CLI
This commit is contained in:
Pig Fang 2020-06-30 11:03:54 +08:00
parent 2d68b3c818
commit 42c10d7856
No known key found for this signature in database
GPG Key ID: A8198F548DADA9E2
2 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,8 @@ class PluginDisableCommand extends Command
$plugin = $plugins->get($this->argument('name'));
if ($plugin) {
$plugins->disable($this->argument('name'));
$this->info(trans('admin.plugins.operations.disabled', ['plugin' => $plugin->title]));
$title = trans($plugin->title);
$this->info(trans('admin.plugins.operations.disabled', ['plugin' => $title]));
} else {
$this->warn(trans('admin.plugins.operations.not-found'));
}

View File

@ -17,7 +17,8 @@ class PluginEnableCommand extends Command
$result = $plugins->enable($name);
if ($result === true) {
$plugin = $plugins->get($name);
$this->info(trans('admin.plugins.operations.enabled', ['plugin' => $plugin->title]));
$title = trans($plugin->title);
$this->info(trans('admin.plugins.operations.enabled', ['plugin' => $title]));
} elseif ($result === false) {
$this->warn(trans('admin.plugins.operations.not-found'));
}