DEV Community

loading...

Shopping Cart Laravel 8: Part 02

Remon Hasan
Self-motivated competitive programmer and full-stack web developer.
Updated on ・1 min read

Source Code

Github

Component Create

Create your own component for cart,product details and shop.
Then create a store function in shopcomponent.php as like:

Alt Text

pass the parameters to the product page as like by adding:

wire:click.prevent="store({{$product->id}},'{{$product->name}}',{{$product->regular_price}})"

Discussion (0)