PHPackages                             tokenly/pusher-client - 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. tokenly/pusher-client

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

tokenly/pusher-client
=====================

A library

v1.1.0(9y ago)08.9kMITPHPPHP &gt;=5.5.0CI failing

Since Jun 7Pushed 6y ago3 watchersCompare

[ Source](https://github.com/tokenly/pusher-client)[ Packagist](https://packagist.org/packages/tokenly/pusher-client)[ RSS](/packages/tokenly-pusher-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

A client component for the client-side messaging pusher service.

### Installation

[](#installation)

- `composer require tokenly/pusher-client`
- Add `Tokenly\PusherClient\Provider\PusherClientServiceProvider::class` to the list of service providers

### Environment Variables

[](#environment-variables)

Set the following environment variables

- `PUSHER_SERVER_URL` (optional, defaults to )
- `PUSHER_CLIENT_URL` (optional, defaults to the server URL)
- `PUSHER_PASSWORD` (required for Tokenly services)

### Server-side Usage

[](#server-side-usage)

#### Send an event

[](#send-an-event)

```
$channel = 'my-event-channel-name';
$data = json_encode(['fromUser' => 'fred', 'messageId' => 101, 'messageText' => 'hello world!']);

$pusher = app(\Tokenly\PusherClient\Client::class);
$pusher->send($channel, $data);
```

### Client-side Usage

[](#client-side-usage)

See the [pusher-client.js example](examples/js/pusher-client.js) for the client javascript code.

#### Step 1: Include the two libraries

[](#step-1-include-the-two-libraries)

This is best toward the end of your body tag.

```

```

#### Step 2: Subscribe and respond to events

[](#step-2-subscribe-and-respond-to-events)

After the two script tags below are loaded, you can subscribe to a channel

```

    var subscribedClient = PusherClient.subscribeToPusherChanel('my-event-channel-name', function(dataReceived) {
        // received a websocket message on channel /my-event-channel-name
        console.log('user '+dataReceived.fromUser+' said '+messageText);
    });

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.5% 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 ~314 days

Total

2

Last Release

3317d ago

### Community

Maintainers

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

---

Top Contributors

[![deweller](https://avatars.githubusercontent.com/u/51414?v=4)](https://github.com/deweller "deweller (17 commits)")[![cryptonaut420](https://avatars.githubusercontent.com/u/8463048?v=4)](https://github.com/cryptonaut420 "cryptonaut420 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tokenly-pusher-client/health.svg)

```
[![Health](https://phpackages.com/badges/tokenly-pusher-client/health.svg)](https://phpackages.com/packages/tokenly-pusher-client)
```

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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