@extends('layout.dashboard') @section('content')
{{ trans('dashboard.subscribers.subscribers') }} @if($currentUser->isAdmin) {{ trans('dashboard.subscribers.add.title') }} @endif

{{ trans('dashboard.subscribers.description') }}

@foreach($subscribers as $subscriber)

{{ trans('dashboard.subscribers.subscriber', ['email' => $subscriber->email, 'date' => $subscriber->created_at]) }}

@if(is_null($subscriber->getOriginal('verified_at'))) {{ trans('dashboard.subscribers.not_verified') }} @else {{ trans('dashboard.subscribers.verified') }} @endif
@if($subscriber->global)

{{ trans('dashboard.subscribers.global') }}

@elseif($subscriber->subscriptions->isNotEmpty()) {!! $subscriber->subscriptions->map(function ($subscription) { return sprintf('%s', $subscription->component->name); })->implode(' ') !!} @else

{{ trans('dashboard.subscribers.no_subscriptions') }}

@endif
@endforeach
@stop