Download the PHP package relaystacks/laravel-conduit without Composer

On this page you can find all versions of the php package relaystacks/laravel-conduit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-conduit

relaystacks/laravel-conduit

Laravel broadcast driver for the RelayStacks Conduit ecosystem — real-time events on shared hosting without Redis, Pusher, or long-running PHP.

Why Conduit

Most real-time broadcasting solutions require Redis, a paid service like Pusher, or the ability to run long-lived PHP processes. On shared cPanel hosting, none of these are available.

Conduit solves this by using a Unix domain socket to send events from PHP to a lightweight Node.js relay server that runs under Passenger. The Node server is a "dumb middleman" — Laravel owns all business logic, channel authorization, and presence tracking. No infrastructure beyond what cPanel already provides.

How It Works

Installation

The service provider is auto-discovered — no manual registration needed.

Publish the config file:

Configuration

Environment Variables

Variable Default Description
CONDUIT_SOCKET_PATH Absolute path to the Unix socket file
CONDUIT_SECRET null Shared HMAC-SHA256 secret (must match conduit-echo)
CONDUIT_TIMEOUT 2 Socket timeout in seconds

Broadcasting Config

Add the conduit connection to config/broadcasting.php:

Set the default driver in .env:

Usage

Broadcast Events

Create events the standard Laravel way:

Channel Types

Public channels — no authorization:

Private channels — require an authenticated user:

Presence channels — track who is online:

Guest Presence

Presence channels can accept unauthenticated users by using a nullable type hint:

Channels with a non-nullable User type hint will reject unauthenticated users automatically.

Channel Authorization

The conduit-echo Node server authorizes private and presence channels by POSTing to Laravel's /broadcasting/auth endpoint, forwarding the browser's session cookies.

Define channel callbacks in routes/channels.php:

API Reference

ConduitServiceProvider

Registered automatically via package auto-discovery. Merges the default config and registers the conduit broadcast driver with Laravel's BroadcastManager.

Published config tag: conduit-config

ConduitBroadcaster

Extends Illuminate\Broadcasting\Broadcasters\Broadcaster.

Method Description
auth($request) Authorize a channel subscription. Private channels require authentication; presence channels defer to the channel callback's type hint.
validAuthenticationResponse($request, $result) Build the JSON auth response. For presence channels, includes channel_data with user_id and user_info.
broadcast(array $channels, $event, array $payload) Send an event to channels via the transport. Failures are logged, not thrown.

Troubleshooting

Events not reaching the browser:

Channel auth failing:

Requirements

License

MIT


All versions of laravel-conduit with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
relaystacks/conduit-php Version ^1.0
illuminate/broadcasting Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package relaystacks/laravel-conduit contains the following files

Loading the files please wait ...