27 lines
575 B
PHP
27 lines
575 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Lvl0\FediDiscover\Events;
|
||
|
|
|
||
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||
|
|
use Illuminate\Broadcasting\PrivateChannel;
|
||
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
||
|
|
use Illuminate\Queue\SerializesModels;
|
||
|
|
|
||
|
|
class UrlDiscovered
|
||
|
|
{
|
||
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||
|
|
|
||
|
|
public function __construct(
|
||
|
|
public string $url,
|
||
|
|
public ?string $postUrl,
|
||
|
|
public ?string $postBody
|
||
|
|
) {}
|
||
|
|
|
||
|
|
public function broadcastOn(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
new PrivateChannel('discovery'),
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|