@extends('voyager::master') @section('page_title', __('voyager::generic.'.(isset($dataTypeContent->id) ? 'edit' : 'add')).' '.$dataType->display_name_singular) @section('css') @stop @section('page_header')

{{ __('voyager::generic.'.(isset($dataTypeContent->id) ? 'edit' : 'add')).' '.$dataType->display_name_singular }}

@stop @section('content')
@if(isset($dataTypeContent->id)) {{ method_field("PUT") }} @endif {{ csrf_field() }} @php $dataTypeRows = $dataType->{(isset($dataTypeContent->id) ? 'editRows' : 'addRows' )}; @endphp
@if (count($errors) > 0)
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@foreach($dataTypeRows as $row) @if(in_array($row->field, ['title', 'slug', 'sub_title', 'description'])) @php $display_options = isset($row->details->display) ? $row->details->display : NULL; @endphp @if (isset($row->details->formfields_custom)) @include('voyager::formfields.custom.' . $row->details->formfields_custom) @else @endif @endif @endforeach

手機版圖片

@foreach($dataTypeRows as $row) @if(in_array($row->field, ['rwd_thumbs'])) {!! app('voyager')->formField($row, $dataType, $dataTypeContent) !!} @foreach (app('voyager')->afterFormFields($row, $dataType, $dataTypeContent) as $after) {!! $after->handle($row, $dataType, $dataTypeContent) !!} @endforeach @endif @endforeach

基礎設定

@foreach($dataTypeRows as $row) @if(in_array($row->field, ['client', 'credits', 'url', 'author_id', 'status', 'created_at', 'type', 'updated_at', 'featured', 'work_belongstomany_category_relationship', 'work_belongstomany_tag_relationship', 'seo_description', 'seo_image'])) @php $display_options = isset($row->details->display) ? $row->details->display : NULL; @endphp @if (isset($row->details->formfields_custom)) @include('voyager::formfields.custom.' . $row->details->formfields_custom) @elseif (in_array($row->field, ['status','featured'])) @php $checked = false; if(isset($dataTypeContent->{$row->field}) || old($row->field)) { $checked = old($row->field, $dataTypeContent->{$row->field}); } else { $checked = isset($options->checked) && $options->checked ? true : false; } @endphp

@if(isset($options->on) && isset($options->off)) @else @endif
@elseif (in_array($row->field, ['created_at','updated_at']))
required == 1) required @endif type="datetime" class="form-control datepicker" name="{{ $row->field }}" value="@if(isset($dataTypeContent->{$row->field})){{ \Carbon\Carbon::parse(old($row->field, $dataTypeContent->{$row->field}))->format('m/d/Y g:i A') }}@else{{old($row->field)}}@endif">
@else @endif @endif @endforeach

縮圖

@foreach($dataTypeRows as $row) @if(in_array($row->field, ['thumbs_image'])) {!! app('voyager')->formField($row, $dataType, $dataTypeContent) !!} @foreach (app('voyager')->afterFormFields($row, $dataType, $dataTypeContent) as $after) {!! $after->handle($row, $dataType, $dataTypeContent) !!} @endforeach @endif @endforeach
{{ csrf_field() }}
@stop @section('javascript') @stop