PHPackages                             darknautica/relay-cloud-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. [Framework](/categories/framework)
4. /
5. darknautica/relay-cloud-laravel

ActiveLibrary[Framework](/categories/framework)

darknautica/relay-cloud-laravel
===============================

Official Laravel package for Relay Cloud — zero-config WebSocket broadcasting

v1.0.2(1mo ago)02↑2900%MITPHPPHP ^8.1CI failing

Since Apr 13Pushed 1mo agoCompare

[ Source](https://github.com/DarkNautica/relay-cloud-laravel)[ Packagist](https://packagist.org/packages/darknautica/relay-cloud-laravel)[ RSS](/packages/darknautica-relay-cloud-laravel/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

Relay Cloud for Laravel
=======================

[](#relay-cloud-for-laravel)

[![Tests](https://github.com/DarkNautica/relay-cloud-laravel/actions/workflows/tests.yml/badge.svg)](https://github.com/DarkNautica/relay-cloud-laravel/actions/workflows/tests.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/f2153b7e5b6f643141588f7bd60c4bd4dd9cd37d45c5d604d786c735954eece5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6461726b6e6175746963612f72656c61792d636c6f75642d6c61726176656c2e737667)](https://packagist.org/packages/darknautica/relay-cloud-laravel)[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE)

Zero-config WebSocket broadcasting for Laravel, powered by [Relay Cloud](https://relaycloud.dev).

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

[](#installation)

```
composer require darknautica/relay-cloud-laravel
```

Add your credentials to `.env`:

```
RELAY_APP_KEY=your-app-key
RELAY_APP_SECRET=your-app-secret
```

That's it. Broadcasting works. No manual editing of `config/broadcasting.php` required.

Find your credentials at [relaycloud.dev](https://relaycloud.dev) under your project's settings.

Usage
-----

[](#usage)

### Verify your setup

[](#verify-your-setup)

```
php artisan relay:install
```

This prints your connection details and the Laravel Echo JavaScript snippet you need for your frontend.

### Laravel Echo setup

[](#laravel-echo-setup)

Add this to `resources/js/bootstrap.js`:

```
import Echo from 'laravel-echo';
import Pusher from 'pusher-js';

window.Pusher = Pusher;
window.Echo = new Echo({
    broadcaster: 'pusher',
    key: import.meta.env.VITE_RELAY_APP_KEY,
    wsHost: 'ws.relaycloud.dev',
    wsPort: 443,
    wssPort: 443,
    forceTLS: true,
    disableStats: true,
    enabledTransports: ['ws', 'wss'],
});
```

Add to your `.env`:

```
VITE_RELAY_APP_KEY="${RELAY_APP_KEY}"
```

### Broadcasting events

[](#broadcasting-events)

Use Laravel broadcasting as normal. All standard features work out of the box:

```
broadcast(new OrderShipped($order));
```

Self-hosted Relay
-----------------

[](#self-hosted-relay)

To point at your own Relay server instead of Relay Cloud, set these additional environment variables:

```
RELAY_HOST=your-relay-host.example.com
RELAY_PORT=6001
RELAY_SCHEME=https
```

For local development without SSL:

```
RELAY_HOST=127.0.0.1
RELAY_PORT=6001
RELAY_SCHEME=http
```

Publishing the config
---------------------

[](#publishing-the-config)

If you need to customize the configuration beyond environment variables:

```
php artisan vendor:publish --tag=relay-config
```

This publishes `config/relay.php` to your application's config directory.

Local Development
-----------------

[](#local-development)

To test the package in a local Laravel app before publishing to Packagist:

1. In your Laravel app's `composer.json`, add:

```
"repositories": [
    {
        "type": "path",
        "url": "../relay-cloud-laravel"
    }
]
```

2. Then require the package:

```
composer require darknautica/relay-cloud-laravel:@dev
```

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

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12

License
-------

[](#license)

MIT. See [LICENSE](LICENSE) for details.

Links
-----

[](#links)

- [Relay Cloud](https://relaycloud.dev)
- [Documentation](https://relaycloud.dev/docs)
- [Getting Started Guide](https://relaycloud.dev/docs/cloud/getting-started)

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance88

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

58d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/538442c06e81234b160948e3e4a3ef2db287d3ca8ceaf06a62762faa60b43c8a?d=identicon)[DarkNautica](/maintainers/DarkNautica)

---

Top Contributors

[![DarkNautica](https://avatars.githubusercontent.com/u/181977445?v=4)](https://github.com/DarkNautica "DarkNautica (5 commits)")

---

Tags

laravelWebSocketspusherBroadcastingRelay

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/darknautica-relay-cloud-laravel/health.svg)

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

###  Alternatives

[laravel/reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.

1.6k12.9M69](/packages/laravel-reverb)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k91.3M277](/packages/laravel-horizon)[laravel/sail

Docker files for running a basic Laravel application.

1.9k199.2M1.2k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76318.2M110](/packages/laravel-mcp)[unopim/unopim

UnoPim Laravel PIM

10.1k2.2k](/packages/unopim-unopim)

PHPackages © 2026

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