Weave Code
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

Livewire Closure Synthesizer Laravel Package

dvarilek/livewire-closure-synthesizer

View on GitHub
Deep Wiki
Context7

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

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.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony