@extends('layouts.master')
@section('title',__('Reports'))
@section('breadcum')
@if (isset($all_reports) && count($all_reports->data) > 0)
{{ __('#') }} |
{{__('Date')}} |
{{__('Subscribed Package')}} |
{{__('Paid Amount')}} |
{{__('Method')}} |
{{__('User')}} |
@php
$sell = null;
@endphp
@foreach ($all_reports->data as $key => $report)
@php
\Stripe\Stripe::setApiKey(env('STRIPE_SECRET'));
$customer_id = \Stripe\Customer::retrieve($report->customer);
$user = Illuminate\Support\Facades\DB::table('users')->where('email', '=', $customer_id->email)->first();
$sell = $sell + (($report->plan->amount/100));
@endphp
{{$key+1}}
|
{{date('d/m/Y',$report->items->data[0]->created)}}
|
{{$report->items->data[0]->plan->id}}
|
{{$report->plan->amount/100}}
|
Stripe
|
@if (isset($user))
{{$user->name ? $user->name : ''}}
@else
{{__('User Removed')}}
@endif
|
@endforeach
{{__('Total Sells')}} {{isset($sell) ? $sell : ''}}
@endif
@if (isset($paypal_subscriptions) && count($paypal_subscriptions) > 0)
{{ __('#') }} |
{{__('Date')}} |
{{__('Subscribed Package')}} |
{{__('Paid Amount')}} |
{{__('Method')}} |
{{__('User')}} |
@foreach ($paypal_subscriptions as $key => $item)
@php
$sell = 0;
$date = $item->created_at->toDateString();
$sell = $sell + $item->price;
@endphp
{{$key+1}}
|
{{$date}}
|
{{$item->plan ? $item->plan->name : 'N/A'}}
|
{{$item->price}}
|
Paypal
|
{{$item->user ? $item->user->name : 'N/A'}}
|
@endforeach