79203866

Date: 2024-11-19 14:46:17
Score: 1.5
Natty:
Report link

Why isn’t the Livewire component responding to the broadcasted event even though the event is being successfully received by the browser?

It may be a namespace issue, try adding a dot prefix to the event in the getListeners() function:

public function getListeners(): array
{
        return [
        "echo:marketplace-listings,.marketplace-listing-created" => 'refreshListings',
    ];
}

as explained here: Livewire not responding to Model Broadcast Events #4831

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Why is
  • Low reputation (1):
Posted by: Gabriel