Files
vito/app/Console/Commands/Plugins/LoadPluginsCommand.php
Saeed Vaziry 342a3aa4c6 Plugins (#616)
* wip

* fix plugin uninstall

* marketplace
2025-06-19 14:07:15 +02:00

35 lines
669 B
PHP

<?php
namespace App\Console\Commands\Plugins;
use App\Facades\Plugins;
use Exception;
use Illuminate\Console\Command;
class LoadPluginsCommand extends Command
{
protected $signature = 'plugins:load';
protected $description = 'Load all plugins from the storage/plugins directory';
/**
* @throws Exception
*/
public function handle(): void
{
$this->info('Loading plugins...');
try {
Plugins::load();
} catch (Exception $e) {
$this->output->error($e->getMessage());
return;
}
Plugins::cleanup();
$this->info('Plugins loaded successfully.');
}
}