elastic basically finish

This commit is contained in:
xiaomlove
2022-03-26 04:27:04 +08:00
parent eb7451f574
commit 0bc1e2f9d3
17 changed files with 1146 additions and 33 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace App\Events;
use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class TorrentUpdated
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public int $torrentId;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(int $torrentId)
{
$this->torrentId = $torrentId;
}
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
*/
public function broadcastOn()
{
return new PrivateChannel('channel-name');
}
}