dvarilek/livewire-closure-synthesizer

A Closure Synthesizer for Laravel Livewire
13,276
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

rappasoft/laravel-livewire-tables

A dynamic table component for Laravel Livewire

3,002,468 1,974
roots/acorn

Framework for Roots WordPress projects built with Laravel components.

2,477,870 992
tanthammar/tall-forms

A dynamic, responsive Laravel Livewire form generator with realtime validation,...

38,429 680
jboysen/laravel-gcc

Use Google Closure Compiler to minify javascript files in Laravel 4.

351 2