Download the PHP package splitstack/translucid without Composer

On this page you can find all versions of the php package splitstack/translucid. 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 translucid

Translucid

Real-time model change broadcasting for Laravel — powered by PostgreSQL LISTEN/NOTIFY or Eloquent lifecycle events.

When a row changes in your database, Translucid fires a Laravel broadcast event on a private channel. Your frontend can subscribe and react instantly, without polling.


Requirements

Installation

Publish the config:


How it works

Translucid supports two broadcast sources — you pick one (or both) per scope via Pennant feature flags:

Mode How events are triggered
From DB (TranslucidFromDB) PostgreSQL triggers call pg_notify. A long-running translucid:listen command picks them up and dispatches broadcast events.
From App (TranslucidFromApp) The HasTranslucid trait adds Eloquent observers (created, updated, deleted) that dispatch broadcast events inline.

Both modes emit the same three events: TranslucidCreated, TranslucidUpdated, TranslucidDeleted.


Getting started

1. Install database triggers (DB mode)

Create a migration to register PostgreSQL triggers for each model you want to observe:

Run migrations, then start the listener:

2. Add the trait (App mode)

Add HasTranslucid to any Eloquent model to broadcast changes via Eloquent observers instead:

3. Activate a feature flag

Both modes are gated by Pennant. Activate the flag for the scope you want (a user, tenant, or null for global):


Broadcast payload

Events broadcast on a private channel (default: translucid). Each event carries:

The broadcast event name includes the table and record key:


Configuration

config/translucid.php:


Multi-tenancy

Built-in Spatie driver

If you use spatie/laravel-multitenancy, configure the built-in driver:

The listener will open a separate PostgreSQL LISTEN connection per tenant and broadcast on scoped channels like translucid.acme.

Custom driver

Implement the TenantDriver contract to integrate any tenancy strategy:

Register it in config/translucid.php:

Custom channel resolver (without a driver)

For simple cases you can override the channel resolver directly in a service provider:


Artisan commands

Command Description
php artisan translucid:listen Start polling PostgreSQL for notifications and dispatching broadcast events. Handles SIGINT/SIGTERM for graceful shutdown.

Events reference

Event Broadcast name op value
TranslucidCreated translucid.created.{table}.{id} created
TranslucidUpdated translucid.updated.{table}.{id} updated
TranslucidDeleted translucid.deleted.{table}.{id} deleted

All three are standard Laravel broadcastable events and work with any broadcasting driver (Reverb, Pusher, Ably, etc.).


Testing


License

MIT — see LICENSE.md.


All versions of translucid with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^11.0|^12.0|^13.0
laravel/pennant Version ^1.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 splitstack/translucid contains the following files

Loading the files please wait ...