
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
laravel-echo
Advanced tools
Laravel Echo library for beautiful Pusher and Socket.IO integration
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Laravel Echo is a JavaScript library that makes it easy to work with WebSockets in a Laravel application. It provides a simple API for subscribing to channels and listening for events broadcast by your Laravel application.
Subscribing to Channels
This feature allows you to subscribe to a public channel and listen for events. In this example, the client subscribes to the 'orders' channel and listens for the 'OrderShipped' event.
Echo.channel('orders').listen('OrderShipped', (e) => { console.log(e.order); });
Private Channels
This feature allows you to subscribe to private channels that require authentication. In this example, the client subscribes to a private 'orders' channel specific to a user and listens for the 'OrderShipped' event.
Echo.private('orders.' + userId).listen('OrderShipped', (e) => { console.log(e.order); });
Presence Channels
Presence channels build on the concept of private channels and allow you to track the presence of users in a channel. In this example, the client joins a 'chat' room and logs the users currently in the room, as well as users joining and leaving.
Echo.join('chat.' + roomId).here((users) => { console.log(users); }).joining((user) => { console.log(user.name); }).leaving((user) => { console.log(user.name); });
Notifications
This feature allows you to listen for notifications sent to a user. In this example, the client subscribes to a private channel for a specific user and listens for notifications.
Echo.private('App.User.' + userId).notification((notification) => { console.log(notification.type); });
Socket.IO is a JavaScript library for real-time web applications. It enables real-time, bidirectional and event-based communication. Compared to Laravel Echo, Socket.IO is more general-purpose and can be used with any backend, not just Laravel.
Pusher is a hosted service that makes it super-easy to add real-time data and functionality to web and mobile applications. The pusher-js library is the client-side component. Compared to Laravel Echo, Pusher provides a hosted solution and can be used with various backend technologies.
Ably is a platform that provides APIs to simplify and overcome the complex aspects of building and maintaining a real-time messaging system. The Ably JavaScript library is the client-side component. Compared to Laravel Echo, Ably offers a more comprehensive set of features and can be used with various backend technologies.
v2.1.6 - 2025-06-17
FAQs
Laravel Echo library for beautiful Pusher and Socket.IO integration
The npm package laravel-echo receives a total of 241,220 weekly downloads. As such, laravel-echo popularity was classified as popular.
We found that laravel-echo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.