livewire / volt

Volt is an elegantly crafted functional API for Livewire.
https://livewire.laravel.com/docs/volt
MIT License
327 stars 19 forks source link

Laravel Echo Notifications #30

Closed jdltechworks closed 1 year ago

jdltechworks commented 1 year ago

Volt Version

1.0.0

Laravel Version

10.10

PHP Version

8.1

Database Driver & Version

MySql 8.0 Sail

Description

Is it possible to use echo notifications in the listeners? Not sure what to do. All of these codes are not subscribing.

Thanks.

<?php

use function Livewire\Volt\{state, on};

on([
    'echo-private:App.Models.User.1,notification' => function () {

    },
]);

on([
    'echo-notification:App.Models.User.1,FriendRequestSent' => function () {
    },
]);

?>

Steps To Reproduce

No detailed steps all is working on my end except for this.

nunomaduro commented 1 year ago

Hey there,

Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Thanks!