{{round($per,2)}}
$details = Product::where('product_slug', $product_slug)->firstorfail();
$save = $details->product_compare_price - $details->product_original_price;
$per=($save*100)/$details->product_compare_price;
round($per, 2);
// echo "<pre>";
// dd($per);
$similar_product=Product::all();
$data = compact('details', 'save','similar_product','per');
// echo "<pre>";
// print_r($similar_product);
return view('front.Details.details')->with($data);
0 Comments