@extends('layouts.demo10.base') @section('content')

{{ $childPage->page_name }}

Parent: {{ $page->page_name }} #{{ $recordId }} · FK: {{ $childPage->foreign_key_col }}

← Back To Parent Data
@if (session('success'))
{{ session('success') }}
@endif @if ($errors->any())
{{ $errors->first() }}
@endif
{{-- Child records --}}

Child Records

Total: {{ $childRecords->count() }}
@foreach($childColumns as $col) @endforeach @forelse($childRecords as $row) @foreach($childColumns as $col) @endforeach @empty @endforelse
# {{ $col->column_name }} Action
{{ $row->id }} @if($col->column_type === 'enum') {{ $row->{$col->column_name} }} @else {{ Str::limit($row->{$col->column_name}, 70) }} @endif
@csrf @method('DELETE')
Abhi koi child record nahi. Right side se add karein.
{{-- Add child record form --}}

+ New Child Record

@csrf @foreach($childColumns as $col) @continue(in_array($col->column_name, $autoManagedColumns ?? [], true))
@php $enumOptions = $col->enum_options ? (json_decode($col->enum_options, true) ?: []) : []; @endphp @if($col->column_type === 'boolean') @elseif($col->column_type === 'enum') @elseif($col->column_type === 'text' || $col->column_type === 'json') @elseif($col->column_type === 'date') @elseif($col->column_type === 'datetime') @elseif(in_array($col->column_type, ['integer','bigInteger','decimal'])) @else @endif
@endforeach
@endsection