count(); $trial = Company::where('status', 'trial')->count(); $expiring = Company::where('status', 'active') ->whereNotNull('active_until') ->whereDate('active_until', '<=', now()->addDays(7)) ->count(); return [ Stat::make('Companii total', $total) ->icon('heroicon-o-building-office-2') ->color('primary'), Stat::make('Active', $active) ->icon('heroicon-o-check-circle') ->color('success'), Stat::make('Trial', $trial) ->icon('heroicon-o-clock') ->color('warning'), Stat::make('Expiră în 7 zile', $expiring) ->description($expiring > 0 ? 'Atenție!' : 'Toate ok') ->icon('heroicon-o-exclamation-triangle') ->color($expiring > 0 ? 'danger' : 'success'), ]; } }