@php
$pkg = $package ?? null;
$lim = $limits ?? null;
$listCount = \DB::table('lists')->where('user_id', $user->id)->where('is_deleted', 0)->count();
$segmentCount = \DB::table('segmentations')->where('user_id', $user->id)->count();
@endphp
@include('plan._meter', [
'label' => trans('plan.contacts.contacts'),
'used' => $lim->contacts ?? 0,
{{-- Overview prefers the per-user limit; this tab ignored it, so the two
pages showed different ceilings for the same account. --}}
'limit' => (! is_null($lim->contacts_limit ?? null) && (int) $lim->contacts_limit !== 0)
? (int) $lim->contacts_limit
: ($pkg->subscribers_limit ?? null),
'icon' => 'la la-users',
])
@include('plan._meter', [
'label' => trans('plan.contacts.lists'),
'used' => $listCount,
'limit' => $pkg->lists_limit ?? null,
'icon' => 'la la-list',
])
@include('plan._meter', [
'label' => trans('plan.contacts.segments'),
'used' => $segmentCount,
'limit' => $pkg->segments_limit ?? null,
'icon' => 'la la-filter',
])
{{-- "Contact your administrator" is right for a self-hosted install and
wrong for a hosted one, where the administrator is us. An addon can
filter this line: hook_filter('PlanHelpLine', ['content' => $line]). --}}
{{ hook_filter('PlanHelpLine', ['content' => trans('plan.common.contact_admin')]) }}