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

{{ $row->exists?'Edit':'New' }} - {{ $d['title'] }}

@csrf @if($row->exists)@method('PUT')@endif @foreach($d['fields'] as $name=>$f)@php $t=$f['type']??'text'; $val=old($name,$row->$name ?? null); @endphp
@if($t==='checkbox') @else@if($t==='textarea')@elseif($t==='select')@php $o = is_array($f['options']) ? $f['options'] : $opts[$f['options']]; @endphp@elseif($t==='datetime-local')@else@endif @endif
@endforeach
Cancel
@endsection