Nov 9, 2021
0
Level 1
Pusher Event Not Firing on API endpoint
I have set pusher as the new broadcast_driver and followed the set up instructions by Pusher. I added the event to my api endpoint. The logs are showing it being occupied and subscribed to the channel. But when i send a post event to that api endpoint the event is not being fired. I cleared my cache, views. served the application again and re bundled my files.
API ENDPOINT:
event(new IncomingText('hello world'));
Event:
class IncomingText implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $message;
public function __construct($message)
{
$this->message = $message;
}
public function broadcastOn()
{
return ['my-channel'];
}
public function broadcastAs()
{
return 'my-event';
}
}
Please or to participate in this conversation.