@foreach ($points as $key => $point)
@php
if ($key == 0) {
$date = $point->created_date;
} elseif (!$point->created_at->isSameDay($points[$key - 1]->created_at)) {
$date = $point->created_date;
} else {
$date = '';
}
@endphp
@include('mobile.includes.wallet-point-component', [
'date' => $date,
'time' => $point->created_time,
'user' => $point->user,
'point' => $point->point,
'invoice_no' => $point->invoice_no
? ($point->remark ? $point->invoice_no . ' , ' . $point->remark : $point->invoice_no)
: $point->remark,
'ref_no' => $point->ref_no,
'status' => 'received',
])
@endforeach
{{ $points->links('mobile-pagination') }}
@foreach ($coupons as $key => $coupon)
@php
if ($key == 0) {
$date = $coupon->created_date;
} elseif (!$coupon->created_at->isSameDay($coupons[$key - 1]->created_at)) {
$date = $coupon->created_date;
} else {
$date = '';
}
@endphp
@include('mobile.includes.wallet-point-component', [
'time' => $coupon->created_time,
'user' => $coupon->reward->client->user,
'point' => $coupon->used_points,
'reward' => $coupon->reward->name,
'status' => 'used',
])
@endforeach
{{ $coupons->links('mobile-pagination') }}