@include('global.headerlinks')
@include('partials.sidebar')
@include('partials.header')

Subscribed Users

Selected
@if(session()->has('message'))
{{ session()->get('message') }}
@elseif(session()->has('error'))
{{ session()->get('error') }}
@endif {{-- --}} @foreach ($data as $value ) @endforeach
Name Email Price Store Name Date Expiration Status Package NameAction
{{$value['f_name'] ?? '--'}} {{$value['l_name'] ?? '--'}} {{$value['email'] ?? '--'}} {{$value['price'] ?? '--'}} {{$value['purchase']['iapSource'] ?? '--'}} @php $startingDate = isset($value['purchase']['transactionDate']) ? $value['purchase']['transactionDate'] : null; if ($startingDate !== null) { $timestamp = (int) $startingDate / 1000; // Convert milliseconds to seconds $dateTime = new DateTime(); $dateTime->setTimestamp($timestamp); $expiryDate = $dateTime->add(new DateInterval('P1Y'))->format('Y-m-d'); echo $expiryDate; } else { echo '--'; } @endphp @php $startingDate = isset($value['purchase']['expireDate']) ? $value['purchase']['expireDate'] : null; if ($startingDate !== null) { $timestamp = (int) $startingDate / 1000; // Convert milliseconds to seconds $dateTime = new DateTime(); $dateTime->setTimestamp($timestamp); $expiryDate = $dateTime->add(new DateInterval('P1Y'))->format('Y-m-d'); echo $expiryDate; } else { echo '--'; } @endphp {{$value['purchase']['status'] ?? '--'}} {{-- @php $startingDate = $value['date']; $expiryDate = (new DateTime($startingDate))->add(new DateInterval('P1Y'))->format('Y-m-d'); $currentDate = date('Y-m-d'); if ($currentDate <= $expiryDate) { $status = 'Active'; } else { $status = 'Expired'; } echo $status; @endphp --}} @if (isset($value['purchase']) && isset($value['purchase']['productId'])) @if ($value['purchase']['productId'] == 'monthly_subscription') monthly @elseif ($value['purchase']['productId'] == 'yearly_subscription') yearly @else {{ $value['purchase']['productId'] }} @endif @else -- @endif
@include('partials.footer')
@include('global.footerlinks')