Replies: 3 comments 1 reply
-
Can you share a bit more code (component and blade)? Does the mount method looks like this? public function mount($submission_id, $status_id) |
Beta Was this translation helpful? Give feedback.
-
I am having the same issue. ^ Livewire\Event {[#2411 ▼]()
#name: "openModal"
#params: array:2 [[▼]()
0 => "resource.update-create"
1 => "{"resource_uuid":"b21e9cf5-9ea5-4dcf-9db4-be2e193d4ab2"}"
]
#up: null
#self: null
#component: null
} And in the resource.update-create component I have tried dumping but it just shows up blank: public function mount($resource_uuid)
{
dd($resource_uuid);
} |
Beta Was this translation helpful? Give feedback.
-
Do not use json_encode([data]) inside Livewire component emit Example |
Beta Was this translation helpful? Give feedback.
-
Is there any way to open a model with parameters from within a Livewire PHP component?
I tried a few variations of
$this->emit("openModal", "submission-status-confirm", json_encode(["submission_id" => $this->submission->id, "status_id" => $status]));
, but always ended up with:When I remove the dependency from the
mount()
it opens fine. What am I missing?Beta Was this translation helpful? Give feedback.
All reactions