@extends('admin.layout') @section('title', $d['label']) @section('content')

{{ $d['label'] }}

@unless($d['readonly'] ?? false)+ Add new@endunless
@foreach($d['columns'] as $label)@endforeach @forelse($rows as $row) @foreach($d['columns'] as $col => $label) @php $v = $row->{$col}; @endphp @endforeach @empty @endforelse
{{ $label }}
@if(is_bool($v) || in_array($col, ['is_active', 'is_published', 'is_read', 'on_home'], true)) {{ $v ? 'Yes' : 'No' }} @elseif($v instanceof \Carbon\Carbon) {{ $v->format('Y-m-d') }} @elseif($col === 'status') {{ $v }} @else {{ \Illuminate\Support\Str::limit((string) $v, 60) }} @endif {{ ($d['readonly'] ?? false) ? 'View' : 'Edit' }}
@csrf @method('DELETE')
Nothing here yet.
{{ $rows->links() }}
@endsection