Help with reactive view

I created a basic greeting card maker that uses two models Design (for the content) and Template (for design and structure). The view is rendered from a blade file that has css and html and uses $this->record and $this->record->template for the values. I have been trying to break the view into two parts where there is a form at one since and rendered content at other side so I can create/edit the design in realtime. I am sure this is possible but I am not able to figure out where to begin with. I made two livewire compoenents CardForm and CardDisplay. I moved the whole view blade to card-display. And now I'm stuck right there. Any heads up or a relevant tutorial (Which I am unable to find) would really mean a lot. Thank You
1 Reply
ByteXR
ByteXR13mo ago
If it's 2 separate livewire components you could use ->afterStateUpdated on the field and trigger livewire event, thats the only thing i can think off, but there might be a better way https://filamentphp.com/docs/2.x/forms/advanced#field-lifecycle https://laravel-livewire.com/docs/2.x/events
Livewire
Events | Livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Filament
Advanced - Form Builder - Filament
The elegant TALL stack form builder for Laravel artisans.