Files
coolify/app/Events/ImageScanUpdated.php
033f0c84da v4.7 (#12478)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Co-authored-by: Aditya Tripathi <aditya@climactic.co>
2026-11-06 14:25:02 +01:00

31 lines
952 B
PHP

<?php
namespace App\Events;
use App\Traits\BroadcastsToTeam;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class ImageScanUpdated implements ShouldBroadcast
{
use BroadcastsToTeam, Dispatchable, InteractsWithSockets, SerializesModels;
/**
* @param bool $final False for a progress update of a running scan; pages that show only results ignore it.
*/
public function __construct(?int $teamId, public string $resourceUuid, public string $scanUuid, public bool $final = true)
{
$this->teamId = $teamId;
}
/**
* @return array{resourceUuid: string, scanUuid: string, final: bool}
*/
public function broadcastWith(): array
{
return ['resourceUuid' => $this->resourceUuid, 'scanUuid' => $this->scanUuid, 'final' => $this->final];
}
}