Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Multiplex

Laravel Multiplex Laravel Package

kolossal-io/laravel-multiplex

Multiplex attaches time-sliced, versioned metadata to Eloquent models. Set meta fluently as properties, schedule future changes, retrieve history or values at a specific time, and use a polymorphic relationship to add metadata to any model without schema changes.

View on GitHub
Deep Wiki
Context7

Multiplex is a Laravel package for attaching time-sliced metadata to Eloquent models. It lets you store extra attributes without touching your database schema, using a polymorphic relationship that works with any model.

$post->likes = 24;
$post->setMeta('likes', 24);
$post->setMetaAt('likes', 6000, '+2 years');
  • Versioned metadata – schedule future changes and keep a full change history
  • Point-in-time queries – retrieve metadata as it was at any given moment
  • Fluent syntax – access metadata as if they were native model properties
  • Polymorphic storage – attach metadata to any Eloquent model
  • Schema-free – extend existing columns without migrations
Frequently asked questions about Laravel Multiplex
How do I add time-sliced metadata to an Eloquent model in Laravel?
Use the `HasMeta` trait on your model and assign metadata fluently, like `$post->likes = 24`, or explicitly with `$post->setMeta('likes', 24)`. The package stores metadata in a polymorphic table without requiring schema changes to your models.
Can I schedule metadata changes for future dates in Laravel Multiplex?
Yes. Use `setMetaAt()` to schedule changes, e.g., `$post->setMetaAt('likes', 6000, '+2 years')`. The package handles time-based updates automatically when the scheduled time arrives.
What Laravel versions does this package support?
Laravel Multiplex supports Laravel 9 and later. It requires MySQL 8.0+ (or equivalent) for window functions, though SQLite and SQL Server are supported with some limitations.
How does Laravel Multiplex handle performance with large datasets?
The package uses database window functions for efficient querying, but performance depends on your database. For large datasets, ensure proper indexing on the meta table and use eager loading helpers like `withMeta()` to avoid N+1 issues.
Can I query metadata for a specific point in time?
Yes. Use `getMetaAt()` or `whereMetaAt()` to retrieve metadata as of a specific timestamp. The package supports time-travel queries to fetch historical or scheduled values.
Does Laravel Multiplex work with Laravel Scout or Nova?
Yes. The package integrates seamlessly with Laravel Scout for metadata-based search and Laravel Nova for UI-driven metadata management, making it ideal for applications requiring dynamic, versioned data.
What happens if I need to downgrade from MySQL 8.0+?
Downgrading databases could break queries relying on window functions (e.g., `ROW_NUMBER()`). The package may require refactoring or alternative approaches like JSON columns if you switch to older database versions.
How do I backfill historical metadata for existing records?
Use `saveMetaAt()` to manually hydrate historical data, such as backdating user preferences. For large datasets, consider batch processing with queued jobs to avoid timeouts or performance issues.
Are there alternatives to Laravel Multiplex for time-sliced data?
If your use case is simpler, Laravel’s built-in JSON columns or attributes might suffice. For complex temporal data, consider event sourcing or a dedicated time-series database, though Multiplex offers a balanced solution for Eloquent-based applications.
How do I handle concurrent metadata updates in production?
The package doesn’t include built-in locking mechanisms, so concurrent updates to the same metadata key could lead to race conditions. Use database transactions or application-level locks if atomicity is critical for your workflow.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections