app/Http/Controllers/CartController.php
//this method duplicates index method of the same Class, except he return only compact data,not view
this method duplicates index method of the same Class, except he return only compact data,not view
this method duplicates index method of the same Class except he return only compact data not view
public static function cart()
    {
        $cart = Cart::getCartArray();
        if(count($cart)<1){
            return redirect('/');
        }
        $products = Cart::getCartProducts($cart);
        return compact('cart','products');
    }
public static function cart ( ) { $ cart = Cart :: getCartArray ( ) ; if ( count ( $ cart ) < 1 ) { return redirect ( '/' ) ; } $ products = Cart :: getCartProducts ( $ cart ) ; return compact ( 'cart' , 'products' ) ; }
this method duplicates index method of the same Class, except he return only compact data,not view
this method duplicates index method of the same Class except he return only compact data not view