@extends('layouts.admin')
@section('title', $def['title'])
@section('actions')
Add
@endsection
@section('content')
@if (!empty($def['note']))
{{ $def['note'] }}
@endif
@foreach ($def['list'] as $col)| {{ $def['fields'][$col]['label'] ?? humanize($col) }} | @endforeach
Actions |
@forelse ($rows as $row)
@foreach ($def['list'] as $col)
@php $f = $def['fields'][$col] ?? []; $v = $row->{$col}; @endphp
@if (($f['type'] ?? '') === 'checkbox')
{!! $v ? '' : '' !!}
@elseif (($f['type'] ?? '') === 'select')
{{ $v === null ? '—' : ($options[$col][$v] ?? $v) }}
@elseif ($col === 'code')
{{ $v }}
@else
{{ $v ?? '—' }}
@endif
|
@endforeach
@if (($def['deletable'] ?? true) !== false)
@endif
|
@empty
No records yet. |
@endforelse
{{ $rows->links() }}
@endsection