New

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

dvarilek/livewire-closure-synthesizer

A Closure Synthesizer for Laravel Livewire
15,223
Install
composer require dvarilek/livewire-closure-synthesizer
Latest Version:v1.1.0
License:MIT
Last Updated:Apr 20, 2025
Links: GitHub  ·  Packagist
Maintainer: dvarilek

Livewire Closure Synthesizer

This simple package adds a custom closure synthesizer for Laravel Livewire.

This essentially allows you to pass closures into livewire components and persist them as public properties across requests.

Closures are serialized and encrypted which ensures that a curious user does not know what the closure contains.


Installation

All you have to do is just run the following command:

composer require dvarilek/livewire-closure-synthesizer

Example Usage

In blade:

<livewire:component 
    :modifyComponentUsing="$modifyComponentUsing"
/>

In Livewire component

class Component extends \Livewire\Component
{
    
    public ?Closure $modifyComponentUsing = null;
    
    // ... 
}

Testing

composer test && composer stan

Changelog

Please refer to Package Releases for more information about changes.


License

This package is under the MIT License. Please refer to License File for more information

Related Packages

dasundev/livewire-dropzone

A Livewire Dropzone component for simple drag-and-drop file uploads.

133,473 231
dasundev/livewire-quill-text-editor

A powerful livewire rich text editor component built top of Quill.

48,596 38
reachweb/statamic-livewire-filters

Livewire filters for Statamic collections.

16,512 16
spiral-packages/livewire

Livewire integration bridge for Spiral Framework

451 2
tomshaw/mediable

A comprehensive Laravel Livewire Media Manager.

41 20

Version History

Version Released License
v1.1.0 MIT
v1.0.0 MIT