PHPackages                             pollsockets/pollsockets-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pollsockets/pollsockets-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pollsockets/pollsockets-laravel
===============================

Serverside implementation of pollsockets taylored for Laravel

1.3.0(9mo ago)795[3 PRs](https://github.com/pollsockets/pollsockets-laravel/pulls)MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Mar 31Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/pollsockets/pollsockets-laravel)[ Packagist](https://packagist.org/packages/pollsockets/pollsockets-laravel)[ Docs](https://github.com/pollsockets/pollsockets-laravel)[ RSS](/packages/pollsockets-pollsockets-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (14)Versions (7)Used By (0)

Serverside implementation of pollsockets tailored for Laravel
=============================================================

[](#serverside-implementation-of-pollsockets-tailored-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/081933c90a70d919d05616b67eca505af54c140f2f4201054349a69849680986/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706f6c6c736f636b6574732f706f6c6c736f636b6574732d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pollsockets/pollsockets-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/081d0c44eb03e3f5a3a8849d0d72e75134acd7fd2974891354ab1b424d723cc1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706f6c6c736f636b6574732f706f6c6c736f636b6574732d6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/pollsockets/pollsockets-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/03a5df1add8c966eeee4d26b577152387acf0951f6be2bbdba1ee013ac5fc6e2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706f6c6c736f636b6574732f706f6c6c736f636b6574732d6c61726176656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/pollsockets/pollsockets-laravel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/c48e0a74178545fcee06f80afaaf1f9566cbff914c019dc4028274116f82d75b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706f6c6c736f636b6574732f706f6c6c736f636b6574732d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pollsockets/pollsockets-laravel)

Why pollsockets?
----------------

[](#why-pollsockets)

Pollsockets is a simple, yet powerful, server-client communication library. It is designed to be used in situations where you need to send data from the server to the client. It is a great alternative to websockets, as it is much simpler to implement and use.

How does it work?
-----------------

[](#how-does-it-work)

Pollsockets uses a simple polling mechanism to send events from the server to the client. Instead of polling an endpoint that returns data, pollsockets polls an endpoint that returns a list of events that have occurred, thus saving bandwidth and response time. The client then processes the events and updates the UI accordingly.

Ecosystem
---------

[](#ecosystem)

### Server side

[](#server-side)

- [Laravel](https://github.com/pollsockets/pollsockets-laravel)

### Client side

[](#client-side)

- [Javascript](https://github.com/pollsockets/pollsockets-js)

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Laravel 9.0 or higher
- Redis 6.0 or higher

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require pollsockets/pollsockets-laravel
```

You can publish the config file with:

```
php artisan vendor:publish --tag="pollsockets-config"
```

This is the contents of the published config file:

```
use Pollsockets\Drivers\RedisChannel;

return [
    'driver' => RedisChannel::class,
];
```

Usage
-----

[](#usage)

```
use Pollsockets\Pollsockets;

// Channel name can be any string. Can be used to separate events from different sources.
$channelName = 'channel';
// Event name can be any string. Can be used to separate events of the same type.
$event = 'reload';

// Publish an event to the channel from anywhere in your code. Perfect for informing client about changes in the database.
Pollsockets::channel($channelName)->publish($event);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Vytautas Smilingis](https://github.com/Plytas)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance72

Regular maintenance activity

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 53.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~418 days

Total

3

Last Release

299d ago

PHP version history (2 changes)1.0.0PHP ^8.1

1.2PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b6ac649b0e37ce4416efa506708ab737f98a3113e6f0916855ae05b1032fc16?d=identicon)[Plytas](/maintainers/Plytas)

---

Top Contributors

[![Plytas](https://avatars.githubusercontent.com/u/17316322?v=4)](https://github.com/Plytas "Plytas (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")

---

Tags

laravelpollsocketspollsockets-laravel

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/pollsockets-pollsockets-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/pollsockets-pollsockets-laravel/health.svg)](https://phpackages.com/packages/pollsockets-pollsockets-laravel)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M626](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
