@foreach($histories as $history) @php $statusKey = match ((int) $history->status) { \App\Models\Telephony\History::STATUS_FAILED => 'status_failed', \App\Models\Telephony\History::STATUS_SUCCEED => 'status_success', \App\Models\Telephony\History::STATUS_WAITING => 'status_waiting', default => null, }; $statusBadgeClass = match ((int) $history->status) { \App\Models\Telephony\History::STATUS_FAILED => 'bg-danger', \App\Models\Telephony\History::STATUS_SUCCEED => 'bg-success', \App\Models\Telephony\History::STATUS_WAITING => 'bg-warning', default => 'bg-secondary', }; @endphp @endforeach
{{ __('views.telephony.history.index_table.id') }} {{ __('views.telephony.history.index_table.bucket_id') }} {{ __('views.telephony.history.index_table.telephone') }} {{ __('views.telephony.history.index_table.document') }} {{ __('views.telephony.history.index_table.status') }} {{ __('views.telephony.history.index_table.created_at') }} {{ __('views.telephony.history.index_table.actions') }}
{{ $history->id }} {{ $history->bucket_id }} {{ $history->telephone }} {{ $history->document }} @if($statusKey) {{ __('views.telephony.history.'.$statusKey) }} @endif {{ $history->created_at ? $history->created_at->toDateTimeString() : '' }}
@foreach($histories as $history) @endforeach