@if (count($commitmentModels) > 0) @include('bo.modules.table-col-sorter', [ 'cols' => [ 'title' => Str::ucfirst(__('validation.attributes.title')), 'picture' => Str::ucfirst(__('validation.custom.picture')), 'order' => Str::ucfirst(__('validation.custom.order')), 'published' => Str::ucfirst(__('validation.custom.activated')), 'updated_at' => Str::ucfirst(__('validation.attributes.updated_at')), ], ]) @foreach ($commitmentModels as $commitmentModel) @php $routeName = request()->route()->getName(); @endphp @if (empty(request()->search) && Session::get("$routeName.sort_col") === 'order') @include('bo.modules.change-model-order', [ 'routeName' => 'commitments', 'model' => $commitmentModel, 'models' => $commitmentModels, ]) @endif @include('bo.modules.change-published-status', [ 'routeName' => 'commitments', 'model' => $commitmentModel, ]) @endforeach @else @endif
{{ $commitmentModel->title }} {{ $commitmentModel->picture_alt }} {{ $commitmentModel->updated_at->isoFormat('LLLL') }} @canAny(['delete', 'duplicate', 'update'], $commitmentModel)
@can('duplicate', $commitmentModel) @endcan @can('update', $commitmentModel) @endcan @can('delete', $commitmentModel) @csrf @method('DELETE') @endcan
@else @endcan
{{ __('crud.other.no_model_found', ['model' => __('models.classes.commitment')]) }}