ldc-crm/resources/views/singleoptins/index-list.blade.php
2023-06-26 09:24:29 +02:00

48 lines
2.2 KiB
PHP

<div class="table-responsive">
<table class="table table-hover fix-action m-0">
<thead class="border-dark border-top-0 border-start-0 border-end-0 border-2">
@php
$cols = [
'email' => __('E-mail'),
'brand_id' => __('Marque'),
'created_at' => __('Date opt-in'),
];
@endphp
@include('modules.table-col-sorter', ['cols' => $cols, 'mobileHide' => ['status'], 'ignore' => ['status', 'optin', 'updated_at']])
</thead>
<tbody>
@if($singleoptinModels->count())
@foreach ($singleoptinModels as $singleoptinModel)
<tr>
<td class="text-center align-middle bg-white">{{ $singleoptinModel->email }}</td>
<td class="text-center align-middle bg-white">{{ $singleoptinModel->brand->name }}</td>
<td class="text-center align-middle bg-white">
<span class="badge bg-warning text-dark text-wrap">{{ $singleoptinModel->created_at }}</span>
</td>
<td class="text-end align-middle bg-white">
<form id="dataDelete"
action="{{ route("single_optins.destroy", $singleoptinModel) }}"
method="POST">
@csrf
@method('DELETE')
@can('delete', \App\Models\SingleOptin::class)
<button class="btn btn-sm btn-danger"
title="{{ __('Supprimer cette :model', ['model' => Str::singular(__('models.classes.singleoptins'))]) }}"
data-bs-toggle="tooltip">
<i class="fa-solid fa-trash"></i>
</button>
@endcan
</form>
</td>
</tr>
@endforeach
@else
<tr>
<td colspan="5" class="text-center bg-white">
<span class="h3">{{ __('Aucun résultat pour les :models', ['models' => __('models.classes.singleoptins')]) }}
</td>
</tr>
@endif
</tbody>
</table>
</div>