playing with extensible fields
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
@extends("lucent::layouts.channel")
|
||||
@pushonce("scripts")
|
||||
<script type="module" src="/vendor/lucent/public/js/editor.js"></script>
|
||||
@endpushonce
|
||||
@section("title")
|
||||
Edit Record
|
||||
@endsection
|
||||
@section("content")
|
||||
|
||||
<script type="application/json" id="edit-data">{!! json_encode($record)!!}</script>
|
||||
|
||||
@foreach($schema->groups as $group)
|
||||
<div>{{$group}}</div>
|
||||
@foreach($schema->fields as $field)
|
||||
@php
|
||||
$fieldId = "field-".$field->data->name."-".$record->id;
|
||||
@endphp
|
||||
<div class="editor-field">
|
||||
@include("lucent::new.edit.field-header" ,["id" => $fieldId])
|
||||
{!! $field->renderForm($record, $fieldId) !!}
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@endforeach
|
||||
@endsection
|
||||
Reference in New Issue
Block a user