@foreach($lap as $key=>$laps)
<tr>
<td class="text-center"><a href="https://roocket.ir/<?= Url('product');?>{!! '/'.$laps->id !!}"><img class="img-thumbnail" title="{{$laps->title}}" alt="{{$laps->title}}" src="{!! \App\Image::find($laps->image_id)->address_image !!}" width="۵۰px" height="۵۰px"></a></td>
<td class="text-left"><a href="https://roocket.ir/<?= Url('product');?>{!! '/'.$laps->id !!}">{{$laps->title}}</a></td>
<td class="text-right">{{$t۱[$key]}} </td>
<td class="text-right">{!! number_format($laps->price)!!} تومان</td>
<?php $t۳+=($laps->price * $t۱[$key]);?>
<td data-product-id="{{$laps->id}}" class="close۱" ><button class="btn btn-danger btn remove" title="حذف" onClick="" type="button">حذف</td>
</tr>
@endforeach
// jquery codeeeeeeeeeeeeeeeeeeeee
$("document").on("click", ".close", function(e){
const productID = $(this).data("product-id");
// happy code
})
من سبد خرید نوشتم اما الان میخوام وقتی رو ی دکمه کلیک کردن بتون تعداد هر کالا رو کم کنم اما اول باید مقدار رو نمایش بدم فقز یمقدار اولین کالا نمایش داده میشه
اولین نفری باشید که به این پرسش کمک میکند و مسیر حل مشکل را باز میکند.
اولین پاسخ را بنویسیدشاید پاسخ شما همینجا باشد