@foreach($histories as $history) @php $statusKey = match ((int) $history->status) { \App\Models\Sms\SmsHistory::STATUS_FAILED => 'status_failed', \App\Models\Sms\SmsHistory::STATUS_SUCCEED => 'status_success', \App\Models\Sms\SmsHistory::STATUS_WAITING => 'status_waiting', default => null, }; $statusBadgeClass = match ((int) $history->status) { \App\Models\Sms\SmsHistory::STATUS_FAILED => 'bg-danger', \App\Models\Sms\SmsHistory::STATUS_SUCCEED => 'bg-success', \App\Models\Sms\SmsHistory::STATUS_WAITING => 'bg-warning', default => 'bg-secondary', }; @endphp @endforeach
{{ __('views.sms.history.index_table.id') }} {{ __('views.sms.history.index_table.bucket_id') }} {{ __('views.sms.history.index_table.numero') }} {{ __('views.sms.history.index_table.mensaje') }} {{ __('views.sms.history.index_table.tipo') }} {{ __('views.sms.history.index_table.status') }} {{ __('views.sms.history.index_table.fecha') }} {{ __('views.sms.history.index_table.response') }}
{{ $history->id }} {{ $history->bucket_id }} {{ $history->numero }} {{ \Illuminate\Support\Str::limit($history->mensaje, 60) }} {{ $history->tipo }} @if($statusKey) {{ __('views.sms.history.'.$statusKey) }} @endif {{ $history->fecha ? \Carbon\Carbon::parse($history->fecha)->toDateTimeString() : '' }} {{ $history->error_message }}