FilamentF
Filament2y ago
lmtc

Livewire Form inside modal but with a different resource

Hi there,
I have been trying to work through this for a while now and can't seem to see anything in docs or discord. I have a pages resource, inside that form I have an action modal which I've called in a livewire view as per docs, but it's just rendering the same form from my pages resource again, instead of pulling in the one from my styling modal class. Is there a way to set the relationship in the extraItemActions?

This is my action:
->modalContent(function (array $arguments, Repeater $component, StylingModal $styling): View {

                                                $block_id = $component->getItemState($arguments['item']);
                                                $styling_data = $styling->getStyling($block_id['block_id']);
                                                
                                                return view('livewire.forms.pages.styling-modal', [
                                                    'block_id' => $block_id['block_id']
                                                ]);
                                            })
Was this page helpful?