@extends('layouts.app') @section('title', $config['label']) @php $editing = request('edit'); @endphp @section('content')
@foreach ($tabs as $t) {{ $t['label'] }} @endforeach
{{-- Adicionar --}}
@csrf @foreach ($config['fields'] as $key => $field) @if ($field['type'] === 'select') @else @endif @endforeach
@foreach ($config['fields'] as $field)@endforeach @forelse ($records as $rec) @if ($editing == $rec->id) @csrf @method('PUT') @foreach ($config['fields'] as $key => $field) @endforeach @else @foreach ($config['fields'] as $key => $field) @endforeach @endif @empty @endforelse
{{ $field['label'] }}Ações
@if ($field['type'] === 'select') @else @endif Cancelar
@if ($field['type'] === 'select') {{ $selectOptions[$key][$rec->$key] ?? '—' }} @else {{ $rec->$key ?: '—' }} @endif
@csrf @method('DELETE')
Ainda sem registos.
@endsection