I have this as broadcasting data:
public function toBroadcast($notifiable)
{
$avatar = !is_null($this->follower->avatar) ? 'storage/' . $this->follower->id . '/' . $this->follower->avatar->image : '' ;
return new BroadcastMessage([
'follower_id' => $this->follower->id,
'avatar' => $avatar,
'name' => $this->follower->name,
'at' => Carbon::now()->format('d/m/Y')
]);
}
It does work but I am getting additional type, uuid and socket within this array... How can I cut those and use just ones that I added?