#Pass model to livewire component using Echo

4 messages · Page 1 of 1 (latest)

void ore
#

I am trying to pass a model from a backend job to a livewire component, i have a public property in the event, but it seems to get passed to the livewire component as an array. How do i make it pass the model.

glacial marlin
void ore
#

ok, i'm just using the id now, but having an issue where my livewire component is triggered twice when i fire the echo event

void ore
#

this is how i'm setting up my listener in my livewire component:

public function getListeners()
    {
        $userId = Auth::id();
        return [
            "echo-private:leads.{$userId},DialLead" => 'showDialLeadModal'
        ];
    }