@extends('layouts.main') @section('page-style') @endsection @section('page-script') @endsection @section('content')

@include('layouts.notifications')
User Info
@php $except = [ 'photo', 'id', 'password_k', 'id_city', 'password_k', 'phone_verified', 'email_verified', 'email_unsubscribed', 'android_device', 'ios_device', 'created_at', 'updated_at', 'point', 'point_transaction', 'point_voucher', 'city' ]; @endphp @foreach ($user[0] as $key => $value) @if (!in_array($key, $except)) @endif @endforeach
{{ ucwords($key) }} @if ($key == "is_suspended") @if ($value == 1) Suspended @else Active @endif @else {{ $value }} @endif
City {{ $user[0]['city']['city_name'] }}
Resume Point

TOTAL VOUCHER
Point Spend

TOTAL TRANSACTION
Point Earned
Point History
@if(!empty($user[0]['point'])) @php $voucherTotal = 0; $trxTotal = 0; $voucherPoint = 0; $trxPoint = 0; @endphp @foreach($user[0]['point'] as $res) @php if ($res['source'] == "voucher") { $voucherTotal = $voucherTotal + 1; $voucherPoint = $voucherPoint + $res['point']; } else { $trxTotal = $trxTotal + 1; $trxPoint = $trxPoint + $res['point']; } @endphp @endforeach @endif @if (!empty($user[0]['point_transaction'])) @foreach ($user[0]['point_transaction'] as $res) @endforeach @endif @if (!empty($user[0]['point_voucher'])) @foreach ($user[0]['point_voucher'] as $res) @endforeach @endif
Date Point Type References
{{ date('d F Y', strtotime($res['created_at'])) }} {{ number_format($res['point'], 0) }} {{ ucwords($res['source']) }} {{ $res['transaction']['transaction_receipt_number'] }}
{{ date('d F Y', strtotime($res['created_at'])) }} {{ number_format($res['point'], 0) }} {{ ucwords($res['source']) }} @if (empty($res['voucher']['trx_id'])) Bought at {{ date('d F Y', strtotime($res['voucher']['created_at'])) }} @else {{ $res['voucher']['trx_id'] }} @endif
@endsection