Simple wire:click not working

Didn’t know about the forelse, thanks a lot for the help, gonna try it and give you feedback.

It’s working perfectly now, wow crazy i can’t say thank you enough, tried everything for several days i was completely stuck on it! You the best mate thank you for your time.

So next time i need to use the forelse? Or the problem was just with the missing divs? I don’t want to make this error again ^^
Thanks man!

yes, just missing close tags on some divs. So your livewire functions were bleeding out of the component and being closed in your layout.

I used @forelse which allowed you to get rid of the if(count($items) > 0) statement surrounding your foreach loop. forelse combines the two, @forelse(we have items - true) true stuff @empty (no items - false) false stuff @endforelse

You’re very welcome Good luck with your project

Thank’s a lot for the explanation, i learned new things.