app/Http/Controllers/CarritoController.php
# Our function for adding a certain product to the cart
Our function for adding a certain product to the cart
Our function for adding a certain product to the cart
public function add(Request $r)
    {
        $cartItem = Cart::add($r->all());
        Session::flash('flash_message', 'Producto Agregado');
        return back();
    }
public function add ( Request $ r ) { $ cartItem = Cart :: add ( $ r -> all ( ) ) ; Session :: flash ( 'flash_message' , 'Producto Agregado' ) ; return back ( ) ; }
Our function for adding a certain product to the cart
Our function for adding a certain product to the cart