37 lines
914 B
PHP
37 lines
914 B
PHP
<?php
|
|
|
|
namespace App\Provisioning\Events;
|
|
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
use Illuminate\Broadcasting\PrivateChannel;
|
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
/**
|
|
* Broadcast on every recorded run event so admin/customer views update live.
|
|
*/
|
|
class StepAdvanced implements ShouldBroadcast
|
|
{
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
|
|
public function __construct(
|
|
public string $runUuid,
|
|
public string $step,
|
|
public string $outcome,
|
|
public int $currentStep,
|
|
public string $status,
|
|
) {}
|
|
|
|
/** @return array<int, PrivateChannel> */
|
|
public function broadcastOn(): array
|
|
{
|
|
return [new PrivateChannel('admin.runs')];
|
|
}
|
|
|
|
public function broadcastAs(): string
|
|
{
|
|
return 'StepAdvanced';
|
|
}
|
|
}
|