2019-08-08 23:03:48 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
|
|
use App\Services\PluginManager;
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
|
2019-08-09 10:13:55 +08:00
|
|
|
class PluginDisableCommand extends Command
|
2019-08-08 23:03:48 +08:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name and signature of the console command.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $signature = 'plugin:disable {name}';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The console command description.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $description = 'Disable a plugin';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Execute the console command.
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function handle(PluginManager $plugins)
|
|
|
|
{
|
|
|
|
$plugins->disable($this->argument('name'));
|
|
|
|
}
|
|
|
|
}
|