Emit event not working

I am working on a shopping cart application, it is working but when I emit the event from single-product-page it does not work

Your listener is trying to run an ‘updateQuantity’ function but the function is called ‘add’.

Try this:

protected $listeners = ['add'];

You’re emitting on click to an ‘addToCart’ event, and in component listener must be the same…you have just ‘add’.


listener name is “add” and i am emitting to add as well

The “add” method is on Single Product and on S hop livewire component and “add” listener is only in cart.php different livewire component

Already tried all that but for you,

I tried it again, Here you go see for yourself.