#Pass model to livewire component using Echo
4 messages · Page 1 of 1 (latest)
It probably won’t actually work properly. Personally I’d pass the id of the model through and retrieve it from the database inside the component
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
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'
];
}