@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 @php // amanin kalau variabel belum diset $table_header = $table_header ?? collect(); $table_detail = $table_detail ?? collect(); $primary = $table_primary->field ?? 'id'; @endphp @foreach ($table_detail as $detail) @php $vcount = $loop->iteration; @endphp isactive ?? '1') == '0' ? 'class=not style=background-color:#ffe9ed;' : '' }}> @foreach ($table_header as $field) @php $string = $field->field; @endphp {{-- untuk Subkat: field "detail_name" itu hasil select alias, jadi aman dipakai --}} @endforeach @endforeach
No{{ $header->alias }}Action
{{ $vcount }} {{ $detail->$string ?? '' }} @if (($authorize->edit ?? '0') == '1') @if (($detail->isactive ?? 1) == 1) @endif @endif @if (($authorize->delete ?? '0') == '1')
@csrf @method('DELETE')
@endif
{{-- Include JavaScript File --}} @include('js.subkat') @endsection