Laravel checkout page total price not working

You can do it like this:

$totalprice = DB::table('carts')
->join('products', 'products.id', '=' , 'carts.product_id')
->where('user_id', '=' , Auth::user()->id )
->sum('products.price');

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top