@extends('layouts.app') @section('site_title', formatTitle([__('Dashboard'), config('settings.title')])) @section('content')
@include('admin.dashboard.header')

{{ __('Overview') }}

@php $cards = [ 'users' => [ 'title' => 'Users', 'value' => $stats['users'], 'route' => 'admin.users', 'icon' => 'people-alt' ], /* [ 'title' => 'Plans', 'value' => $stats['plans'], 'route' => 'admin.plans', 'icon' => 'package' ], [ 'title' => 'Payments', 'value' => $stats['payments'], 'route' => 'admin.payments', 'icon' => 'credit-card' ], */ [ 'title' => 'Reports', 'value' => $stats['reports'], 'route' => 'admin.reports', 'icon' => 'list-alt' ] ]; @endphp @foreach($cards as $card)
@include('icons.' . $card['icon'], ['class' => 'fill-current width-5 height-5'])
{{ number_format($card['value'], 0, __('.'), __(',')) }}
@endforeach

{{ __('Activity') }}

{{ __('Latest users') }}
@if(count($users) == 0) {{ __('No data') }}. @else
@foreach($users as $user)
{{ $user->email }}
@include('admin.users.partials.menu', ['user' => $user])
@endforeach
@endif
@if(count($users) > 0) @endif
@if(paymentProcessors())
{{ __('Latest payments') }}
@if(count($payments) == 0) {{ __('No data') }}. @else
@foreach($payments as $payment)
@if($payment->status == 'completed') {{ __('Completed') }} @elseif($payment->status == 'pending') {{ __('Pending') }} @else {{ __('Cancelled') }} @endif
{{ $payment->plan->name }}
@include('account.payments.partials.menu')
@endforeach
@endif
@if(count($payments) > 0) @endif
@else
{{ __('Latest reports') }}
@if(count($reports) == 0) {{ __('No data') }}. @else
@foreach($reports as $report)
{{ $report->updated_at->diffForHumans() }}
@include('reports.partials.menu')
@endforeach
@endif
@if(count($reports) > 0) @endif
@endif

{{ __('More') }}

@include('icons.website', ['class' => 'fill-current width-6 height-6'])
{{ __('Website') }}
{{ __('Visit the official website.') }}
@include('icons.book', ['class' => 'fill-current width-6 height-6'])
{{ __('Documentation') }}
{{ __('Read the documentation.') }}
@include('icons.history', ['class' => 'fill-current width-6 height-6'])
{{ __('Changelog') }}
{{ __('See what\'s new.') }}
@endsection @include('admin.sidebar')