Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

igorleszczynski's avatar

laravel/reverb external connection

Hello,

I am writing a java program that connects to a laravel reverb server. I managed to get a connection, laravel reverb reads the message but does not broadcast it to the appropriate channel.

No Broadcasting To ................................... App.Models.WeightScale.1 in debug.

However, if I call this event manually in laravel I get this debug.

The channel is not private or anything like that. I join the channel. If I send the event directly in laravel my java application reads this event correctly.

Please help, the documentation on this issue is scarce.

{"event":"pusher_internal:subscription_succeeded","data":"{}","channel":"App.Models.WeightScale.1"}

My simple event:

{"data":{"weight":123.56},"channel":"App.Models.WeightScale.1","event":"WeightScaleWeightUpdated"}

frontend code:

useEffect(() => {
        Echo.channel('App.Models.WeightScale.1').listen('.WeightScaleWeightUpdated', (e) => {
            console.log(e);
        });
    }, []);

event:

debug endpoint in laravel:

Route::get('/test', function() {
    /* @var WeightScale $ws */
    $ws = WeightScale::find(1);
    $ws->setWeight(123.45);
});

setWeightFunction:

   public function setWeight(float $weight)
    {
        $this->weight = $weight;
        event(new WeightScaleWeightUpdated($this));
    }

java class:

my channel:

Broadcast::channel('App.Models.WeightScale.{id}', function() {
    return true;
});
0 likes
0 replies

Please or to participate in this conversation.