@php
$activePlatforms = \App\Models\Plugin::where('type', 'platform')
->where('status', 'active')
->pluck('name')
->toArray();
// Fallback if no platforms active
if (empty($activePlatforms)) {
$activePlatforms = ['Android', 'Windows', 'macOS'];
}
// Shuffle and take max 3 random platforms
shuffle($activePlatforms);
$activePlatforms = array_slice($activePlatforms, 0, 3);
// Badge colors cycle
$badgeColors = ['green', 'blue', 'purple', 'orange'];
@endphp
@foreach($activePlatforms as $index => $platform)
@php
$color = $badgeColors[$index % count($badgeColors)];
// Position badges dynamically (bottom area only, no top)
$positions = [
'absolute -left-4 bottom-24',
'absolute right-24 bottom-20',
'absolute left-20 bottom-40',
];
$position = $positions[$index] ?? $positions[0];
@endphp
@endforeach