@extends('layouts.app') @php $eyebrow = 'Manage'; $pageTitle = $title; @endphp @section('content')
@if($description)

{{ $description }}

@endif
New
@foreach($fields as $f) @continue(!empty($f['hideInTable'])) @endforeach @forelse($rows as $row) @foreach($fields as $f) @continue(!empty($f['hideInTable'])) @endforeach @empty @endforelse
{{ $f['label'] }}Actions
@php $type = $f['type'] ?? null; $val = $row->{$f['name']}; @endphp @if($type === 'money') ${{ number_format((float) $val, 2) }} @elseif($type === 'reference') @php $relation = \Illuminate\Support\Str::camel(\Illuminate\Support\Str::before($f['name'], '_id')); $related = $row->{$relation} ?? null; $relLabel = $related ? ($related->{$f['refLabel'] ?? 'name'} ?? '—') : '—'; @endphp @if($related) {{ $relLabel }} @else — @endif @elseif(in_array($type, ['file', 'image'])) @if($val) @if($type === 'image') @else View @endif @else — @endif @elseif($type === 'select') @php $statusColors = [ 'active' => 'st-green', 'occupied' => 'st-green', 'renewed' => 'st-blue', 'vacant' => 'st-gray', 'draft' => 'st-gray', 'moved out' => 'st-gray', 'notice given' => 'st-orange', 'expiring' => 'st-orange', 'reserved' => 'st-orange', 'under maintenance' => 'st-orange', 'expired' => 'st-red', 'terminated' => 'st-red', 'blacklisted' => 'st-red', 'unavailable' => 'st-red', ]; $cls = $statusColors[$val] ?? 'st-violet'; @endphp {{ $val ?? '—' }} @elseif($type === 'checkbox') @if($val) Yes @else No @endif @else {{ $val ?? '—' }} @endif
@csrf @method('DELETE')

Nothing here yet

Use the New button to add your first record.

New {{ \Illuminate\Support\Str::singular($title) }}
@endsection @section('scripts') @endsection