Класс события, пишет что не находит dontBroadcastToCurrentUser(); хотя класс подключен (use Illuminate\Broadcasting\InteractsWithSockets;)
namespace App\Events;
use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
class NewCommentAdded implements ShouldBroadcast
{
use SerializesModels;
public $comment;
public function __construct($data)
{
$this->comment = $data;
$this->dontBroadcastToCurrentUser();
}
public function broadcastOn()
{
return new Channel('comment');
}
}
Почему не видит?