@extends('layouts.admin') @section('buttons') @if($id && $url = $record->getDetailUrl(['preview' => true])) Preview @endif @can('update', $record) @endcan @can('delete', $record) @endcan @can('back', $record) Back @endcan @endsection @section('content')
@csrf
@csrf {{--
Example
@row([ 'type' => 'textinput', 'has_language' => true, 'field' => 'title', 'options' => [ 'required' => true, ], 'remark' => 'Remark here' ]) @row([ 'type' => 'datepicker', 'field' => 'date', ]) @row([ 'type' => 'textarea', 'has_language' => true, 'field' => 'description', ]) @row([ 'type' => 'editor', 'field' => 'editor', 'has_language' => true, ]) @row([ 'type' => 'colorpicker', 'field' => 'color', ]) @row([ 'type' => 'image-upload', 'field' => 'image', ]) @row([ 'type' => 'image-upload', 'field' => 'file', 'options' => [ 'is_file' => true ] ]) @row([ 'type' => 'image-upload', 'field' => 'images', 'options' => [ 'is_single' => false ] ]) @row([ 'type' => 'radio', 'field' => 'my_radio', 'options' => [ 'default' => 0, 'value_key' => 'value', 'title_key' => 'title', 'list' => [ [ 'title' => 'Yes', 'value' => 1, ], [ 'title' => 'No', 'value' => 0, ], ] ] ]) @row([ 'type' => 'select', 'field' => 'my_select', 'options' => [ 'placeholder' => [ 'title' => 'Please Select' ], 'value_key' => 'id', 'title_key' => 'title', 'list' => [ [ 'title' => 'Title 1', 'id' => 1, ], [ 'title' => 'Title 2', 'id' => 2, ], ] // 'list' => $tags->toArray() ] ]) @row([ 'type' => 'searchselect', 'field' => 'tag_id', 'title' => 'Search Select', 'options' => [ 'value_key' => 'id', 'title_key' => 'title', 'list' => $tags->toArray() ] ]) @row([ 'type' => 'checkbox', 'field' => 'Checkbox', 'options' => [ 'value_key' => 'id', 'title_key' => 'title', 'checked' => $record->tags->pluck('id')->toArray(), 'list' => $tags->toArray() ] ]) @row([ 'type' => 'multiselect', 'field' => 'tags', 'title' => 'Multi Select', 'options' => [ 'key' => 'id', 'label' => 'title', 'selected' => $record->tags->pluck('id')->toArray(), 'items' => $tags->toArray() ] ]) @row([ 'type' => 'map', 'field' => 'address', 'has_language' => true, ])
Custom Content
@repeater([ 'field' => 'logos', 'show_title' => true, 'sub_fields' => [ [ 'type' => 'image-upload', 'field' => 'image', 'options' => [ 'width' => '20%' ] ], [ 'type' => 'textarea', 'field' => 'title', 'has_language' => true, 'options' => [ 'width' => '20%' ] ], [ 'type' => 'editor', 'field' => 'description', 'has_language' => true, 'options' => [ 'width' => '60%' ] ], ] ])
--}}
Vue Components
@row([ 'type' => 'image-upload', 'field' => 'image', ])
@endsection @section('js-before') @parent @endsection