New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

maarheeze/uuid-livewire

livewire integration for a simple uuid value object
190
Install
composer require maarheeze/uuid-livewire
Latest Version:3.0.1
PHP:^8.4
Laravel:10 – 13
License:MIT
Last Updated:Sep 4, 2026
Links: GitHub  ·  Packagist
Maintainer: wietsewarendorff

maarheeze/uuid-livewire

Livewire integration for maarheeze/uuid.

Livewire serializes component properties between requests. Without this package, it does not know how to handle Uuid value objects and will fail when one is used as a property. This package registers a property synthesizer that teaches Livewire how to serialize and deserialize Uuid instances automatically.

Installation

composer require maarheeze/uuid-livewire

Usage

Custom Livewire components

Declare a Uuid property directly — no manual conversion needed.

use Livewire\Component;
use Maarheeze\Uuid\Uuid;

class ShowArticle extends Component
{
    public Uuid $articleId;
}

Typed identifiers

Typed identifiers — your own classes using the IsUuid trait — are supported the same way, and keep their own type across requests. A PlayerId property hydrates back as a PlayerId, never as a plain Uuid.

use Livewire\Component;
use App\Player\PlayerId;

class ShowPlayer extends Component
{
    public PlayerId $playerId;
}

This also covers properties updated from the browser, such as wire:model bindings and url parameters.

Filament

Filament pages are Livewire components. When a Filament resource uses a Uuid as its primary key, Livewire needs to serialize it between requests — for example, when loading an edit page. Without this package, Filament will fail to keep track of the record.

use Filament\Resources\Resource;
use App\Models\Article; // model with a Uuid primary key

class ArticleResource extends Resource
{
    protected static string $model = Article::class;
}

No additional configuration is required in either case — installing this package is enough.

License

MIT

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

651,963,193 9,701
laravel/framework

The Laravel Framework.

610,364,751 34,988
laravel/tinker

Powerful REPL for the Laravel framework.

518,004,183 7,444
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

435,097,283 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

412,228,818 4,664

Version History

Version Released PHP License
3.0.1 ^8.4 MIT
3.0.0 ^8.4 MIT
2.0.0 ^8.4 MIT
1.0.0 ^8.2 MIT