The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by App\Events\NotificationEvent: $id, $relations, $class, $connection, $keyBy
Loading history...
20
21
/** @var array */
22
private $data;
23
24
/** @var int */
25
private $userId;
26
27
/**
28
* NotificationEvent constructor.
29
*
30
* Initialize notification data and user that should receive the notification.
31
*
32
* @param array $data
33
* @param $userId
34
*/
35
public function __construct(array $data, $userId)
36
{
37
$this->data = $data;
38
$this->userId = $userId;
39
}
40
41
/**
42
* Get the channels the notification should broadcast on.