The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by FaithGen\SDK\Events\Commenter\UserPresent: $id, $relations, $class, $connection, $keyBy
Loading history...
15
/**
16
* @var array
17
*/
18
private array $data;
19
/**
20
* @var User
21
*/
22
private User $user;
23
24
/**
25
* Create a new event instance.
26
*
27
* @param User $user
28
* @param array $data
29
*/
30
public function __construct(User $user, array $data)
31
{
32
$this->data = $data;
33
$this->user = $user;
34
}
35
36
/**
37
* Get the channels the event should broadcast on.
38
*
39
* @return \Illuminate\Broadcasting\Channel|array
40
*/
41
public function broadcastOn()
42
{
43
return new PrivateChannel('comments-'.$this->data['category'].'-'.$this->data['item_id']);