Total Complexity | 3 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class PostVoted extends BroadcastEvent implements ShouldBroadcast |
||
12 | { |
||
13 | use Dispatchable, InteractsWithSockets, SerializesModels; |
||
|
|||
14 | |||
15 | public function __construct(public $payload, private int $topicId) |
||
16 | { |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * @return Channel|Channel[] |
||
21 | */ |
||
22 | public function broadcastOn() |
||
23 | { |
||
24 | return new Channel('topic:' . $this->topicId); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return array |
||
29 | */ |
||
30 | public function broadcastWith() |
||
33 | } |
||
34 | } |
||
35 |