Files
Xboard/app/Console/Commands/XboardUpdate.php
xboard a838a43ae5 feat: multiple improvements and bug fixes
- Add gift card redemption feature
- Resolve custom range selection issue in overview
- Allow log page size to be modified
- Add subscription path change notification
- Improve dynamic node rate feature
- Support markdown documentation display for plugins
- Reduce power reset service logging
- Fix backend version number not updating after update
2025-07-14 00:33:04 +08:00

52 lines
1.1 KiB
PHP

<?php
namespace App\Console\Commands;
use App\Services\UpdateService;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB;
class XboardUpdate extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'xboard:update';
/**
* The console command description.
*
* @var string
*/
protected $description = 'xboard 更新';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->info('正在导入数据库请稍等...');
Artisan::call("migrate");
$this->info(Artisan::output());
Artisan::call('horizon:terminate');
$updateService = new UpdateService();
$updateService->updateVersionCache();
$this->info('更新完毕,队列服务已重启,你无需进行任何操作。');
}
}