Search by

artisan-toolbox / mosaicast

allanivp

Mosaicast is a Laravel event delivery package that intelligently routes events through the channel best suited to the current context.

Package info

github.com/artisan-toolbox/mosaicast

pkg:composer/artisan-toolbox/mosaicast

Fund package maintenance!

artisan-toolbox

Statistics

Installs: 352

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

1.3.2 2026-11-20 23:32 UTC

This package is auto-updated.

Last update: 2026-11-20 23:35:23 UTC


README

Mosaicast

version Packagist PHP Laravel Tests Docs

Laravel event delivery through Inertia props or private session broadcasting.

Installation

You can install the package via Composer:

composer require artisan-toolbox/mosaicast

Check the installation requirements.

Usage

Dispatch an event during a request:

use ArtisanToolbox\Mosaicast\Facades\Mosaicast;

Mosaicast::dispatch('orders.updated', [
    'orderId' => $order->id,
]);

The mosaicast() helper offers the same implicit dispatch API. Call it without an event to target a captured session explicitly: mosaicast()->toSession($identifier)->dispatch(...).

An Inertia response that resolves the mosaicast shared prop carries the event in mosaicast.events. Other responses use the current session's private broadcast channel. See the complete documentation for jobs, event objects, channel authorization, and the Vue client.

Resources