@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
List {{ $title_menu }}
{{-- alert --}} @include('components.alert')

{{-- retrieve table header --}} @foreach ($table_header as $header) @endforeach {{-- retrieve table detail --}} @foreach ($table_detail as $detail) isactive == 'Not Active' ? 'class="not" style="background-color:#ffe9ed;"' : '' !!}> @foreach ($table_header as $field) @if ($field->type == 'image') @php $imageValue = $detail->{$field->field}; $isUrl = str_starts_with($imageValue, 'http://') || str_starts_with($imageValue, 'https://'); $thumbPath = 'storage/' . $imageValue . 'tumb.png'; $fullPath = 'storage/' . $imageValue; $defaultImage = asset('img/profile.png'); if ($isUrl) { $imageUrl = $imageValue; } elseif ( !empty($imageValue) && file_exists(public_path($thumbPath)) ) { $imageUrl = asset($thumbPath); } elseif ( !empty($imageValue) && file_exists(public_path($fullPath)) ) { $imageUrl = asset($fullPath); } else { $imageUrl = $defaultImage; } if ($isUrl) { $modalUrl = $imageValue; } elseif ( !empty($imageValue) && file_exists(public_path($fullPath)) ) { $modalUrl = asset($fullPath); } else { $modalUrl = $defaultImage; } @endphp @else @endif @endforeach @endforeach
Action No{{ $header->alias }}
@if ($detail->isactive != 'Not Active') @endif
{{ method_exists($table_detail, 'firstItem') && $table_detail->firstItem() ? $table_detail->firstItem() + $loop->index : $loop->iteration }} image {{ $modalUrl }} {{ $detail->{$field->field} ?? '-' }}
Data {{ $table_detail->firstItem() }} - {{ $table_detail->lastItem() }} dari {{ $table_detail->total() }} data.
{{ $table_detail->appends(request()->query())->links('pagination::bootstrap-4') }}
@if (isset($authorize) && $authorize->excel == '1') Excel @endif @if (isset($authorize) && $authorize->pdf == '1') PDF @endif
@foreach ($table_detail as $detail)
#{{ method_exists($table_detail, 'firstItem') && $table_detail->firstItem() ? $table_detail->firstItem() + $loop->index : $loop->iteration }} @if ($detail->isactive == 'Not Active') Not Active @endif
@foreach ($table_header as $field)
{{ $field->alias }} @if ($field->type == 'image') @php $imageValue = $detail->{$field->field}; $isUrl = str_starts_with($imageValue, 'http://') || str_starts_with($imageValue, 'https://'); $thumbPath = 'storage/' . $imageValue . 'tumb.png'; $fullPath = 'storage/' . $imageValue; $defaultImage = asset('img/profile.png'); if ($isUrl) { $imageUrl = $imageValue; } elseif ( !empty($imageValue) && file_exists(public_path($thumbPath)) ) { $imageUrl = asset($thumbPath); } elseif ( !empty($imageValue) && file_exists(public_path($fullPath)) ) { $imageUrl = asset($fullPath); } else { $imageUrl = $defaultImage; } $modalUrl = $isUrl ? $imageValue : (!empty($imageValue) && file_exists(public_path($fullPath)) ? asset($fullPath) : $defaultImage); @endphp
image
@else
{{ $detail->{$field->field} ?? '-' }}
@endif
@endforeach
@endforeach
Data {{ $table_detail->firstItem() }} - {{ $table_detail->lastItem() }} dari {{ $table_detail->total() }} data.
{{ $table_detail->appends(request()->query())->links('pagination::bootstrap-4') }}
{{-- check flag js on dmenu --}} @if ($jsmenu == '1') @if (view()->exists("js.{$dmenu}")) @push('addjs') {{-- file js in folder (resources/views/js) --}} @include('js.' . $dmenu); @endpush @else @push('addjs') @endpush @endif @endif @endsection @push('js') @endpush