feat: 添加 Laravel Reverb 支持,更新 .env.example 文件以配置 WebSocket,增强彩票调度功能,更新 API 路由以支持期号管理与结果发布
This commit is contained in:
20
app/Console/Commands/LotteryHallCountdownCommand.php
Normal file
20
app/Console/Commands/LotteryHallCountdownCommand.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\Draw\LotteryHallRealtimeBroadcaster;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class LotteryHallCountdownCommand extends Command
|
||||
{
|
||||
protected $signature = 'lottery:hall-countdown';
|
||||
|
||||
protected $description = '大厅 countdown WebSocket:`draw.countdown`(每秒;见界面文档 §2.1)';
|
||||
|
||||
public function handle(LotteryHallRealtimeBroadcaster $broadcaster): int
|
||||
{
|
||||
$broadcaster->countdownPulse();
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user