@php // Real routes detected in your project: // applications (GET) -> index // applications.trash (GET) // applications.manage (GET) {app} // applications.settings (GET) {app} // applications.licenses (GET) {app} $appsIndexUrl = route('applications'); $appsTrashUrl = route('applications.trash'); $appsUsed = (int) ($appsCount ?? 0); $limitRaw = $settings?->apps_limit; // NULL = unlimited $appsLimit = is_null($limitRaw) ? null : (int) $limitRaw; $limitLabel = is_null($limitRaw) ? '∞' : (string) $appsLimit; $canCreate = (bool) ($settings?->can_create_apps); // ✅ Real license values from the controller $licensesActive = (int) ($licensesActive ?? 0); $licensesTotal = (int) ($licensesTotal ?? 0); $licensesPct = (int) ($licensesPct ?? 0); // ✅ Real activity values from the controller $activations7d = (int) ($activations7d ?? 0); $validations7d = (int) ($validations7d ?? 0); // ✅ 14-day series $seriesActivations = (array) ($chart14d['activations'] ?? []); $seriesValidations = (array) ($chart14d['validations'] ?? []); $apps = $apps ?? collect(); $appsPct = ($appsLimit && $appsLimit > 0) ? min(100, round(($appsUsed / $appsLimit) * 100)) : null; $sparkPoints = function(array $vals, int $w = 260, int $h = 64) { $n = count($vals); if ($n <= 1) return ""; $min = min($vals); $max = max($vals); $range = max(1, $max - $min); $padX = 6; $padY = 8; $usableW = $w - $padX * 2; $usableH = $h - $padY * 2; $pts = []; foreach ($vals as $i => $v) { $x = $padX + ($usableW * ($i / ($n - 1))); $norm = ($v - $min) / $range; $y = $padY + ($usableH * (1 - $norm)); $pts[] = round($x, 2) . "," . round($y, 2); } return implode(" ", $pts); }; @endphp

Overview

A quick summary of your account, projects, and licenses.
{{-- ✅ Top cards --}}
{{-- Account --}}
Account status
{{ $canCreate ? 'Approved' : 'Pending' }}
@if($canCreate) Approved @else Pending @endif
Company
{{ $tenant?->company_name ?? '-' }}
@if(! $canCreate)
Your account is pending approval. Contact support to enable app creation.
@endif
{{-- Apps usage --}}
Projects (apps)
{{ $appsUsed }} / {{ $limitLabel }}
Limit
@if(!is_null($appsPct))
Usage {{ $appsPct }}%
@else
Unlimited apps for your plan.
@endif
{{-- Licenses --}}
Licenses
{{ $licensesActive }} active
Total: {{ $licensesTotal }}
{{ $licensesPct }}%
Active vs total licenses.
{{-- Activity + chart --}}
Last 7 days
Activations {{ $activations7d }}
Validations {{ $validations7d }}
Activity
@if(count($seriesActivations) >= 2 || count($seriesValidations) >= 2)
@if(count($seriesActivations) >= 2) @endif @if(count($seriesValidations) >= 2) @endif
Activations
Validations
@else
No chart data yet.
@endif
{{-- ✅ Projects list --}}
Projects
Your applications
Check versions, active licenses, and jump straight into Manage.
View all
@if($apps->count() === 0)
No apps yet
Create your first app to start issuing licenses.
@else
@foreach($apps as $app) @php $activeLic = (int) ($app->licenses_active_count ?? 0); $ver = $app->current_version ?? $app->version ?? '—'; $manageUrl = route('applications.manage', $app); $licensesUrl = route('applications.licenses', $app); $settingsUrl = route('applications.settings', $app); @endphp @endforeach
App Version Licenses (active) Created Action
{{ $app->name ?? '—' }}
{{ $app->key }}
{{ $ver }} {{ $activeLic }} {{ optional($app->created_at)->format('Y-m-d') ?? '—' }}
Tip: To show active licenses per app, use withCount() in the controller.
@endif