3ffd3fc819
feat: database backup is realtime now
29 lines
720 B
PHP
29 lines
720 B
PHP
<?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 TestEvent implements ShouldBroadcast
|
|
{
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
public $teamId;
|
|
public function __construct()
|
|
{
|
|
$this->teamId = auth()->user()->currentTeam()->id;
|
|
}
|
|
|
|
public function broadcastOn(): array
|
|
{
|
|
return [
|
|
new PrivateChannel("team.{$this->teamId}"),
|
|
];
|
|
}
|
|
}
|