Echo Version
2.2.6
Laravel Version
12.0
PHP Version
8.4.15
NPM Version
11.7.0
Database Driver & Version
sqlite
Description
I have two hooks listening to the same notification channel and logging a message when a notification is received.
const channel = `App.Models.User.${auth.user.id}`;
useEchoNotification(channel, () => console.log('user notification channel using useEchoNotification'));
useEcho(
channel,
'.Illuminate\\Notifications\\Events\\BroadcastNotificationCreated',
() => console.log("user notification channel using useEcho"),
);
I expect to see two logs in the console, but only the second one (useEcho) is logged.
Steps To Reproduce
A minimal reproduction is available here: https://github.com/DhiaBen20/laravel-echo-bug-report
Steps:
- Clone the repository
- Install dependencies
- cp .env.example .env
- php artisan key:gen
- php artisan migrate
- php artisan reverb:install
- composer run dev
- php artisan reverb:start
- login and go to dashboard page and open the console.
- inside tinker notify the currently authenticated user
User::first()->notify(new \App\Notifications\Test) and you will see one log printed on the console instead of two
Echo Version
2.2.6
Laravel Version
12.0
PHP Version
8.4.15
NPM Version
11.7.0
Database Driver & Version
sqlite
Description
I have two hooks listening to the same notification channel and logging a message when a notification is received.
I expect to see two logs in the console, but only the second one (useEcho) is logged.
Steps To Reproduce
A minimal reproduction is available here: https://github.com/DhiaBen20/laravel-echo-bug-report
Steps:
User::first()->notify(new \App\Notifications\Test)and you will see one log printed on the console instead of two