@php $edit = !is_null($dataTypeContent->getKey()); $add = is_null($dataTypeContent->getKey()); @endphp @extends('voyager::master') @section('css') @stop @section('page_title', __('voyager::generic.'.($edit ? 'edit' : 'add')).' '.$dataType->getTranslatedAttribute('display_name_singular')) @section('page_header')

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

@include('voyager::multilingual.language-selector') @stop @section('content')
@if($edit) {{ method_field("PUT") }} @endif {{ csrf_field() }}
@if (count($errors) > 0)
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif

{{ __('voyager::post.title') }} {{ __('voyager::post.title_sub') }}

@include('voyager::multilingual.input-hidden', [ '_field_name' => 'title', '_field_trans' => get_field_translations($dataTypeContent, 'title') ])

{{ __('voyager::post.content') }}

@include('voyager::multilingual.input-hidden', [ '_field_name' => 'body', '_field_trans' => get_field_translations($dataTypeContent, 'body') ]) @php $dataTypeRows = $dataType->{($edit ? 'editRows' : 'addRows' )}; $row = $dataTypeRows->where('field', 'body')->first(); @endphp {!! app('voyager')->formField($row, $dataType, $dataTypeContent) !!}

{!! __('voyager::post.excerpt') !!}

@include('voyager::multilingual.input-hidden', [ '_field_name' => 'excerpt', '_field_trans' => get_field_translations($dataTypeContent, 'excerpt') ])

{{ __('voyager::post.additional_fields') }}

@php $dataTypeRows = $dataType->{($edit ? 'editRows' : 'addRows' )}; $exclude = ['title', 'body', 'excerpt', 'slug', 'status', 'category_id', 'author_id', 'featured', 'image', 'meta_description', 'meta_keywords', 'seo_title']; @endphp @foreach($dataTypeRows as $row) @if(!in_array($row->field, $exclude)) @php $display_options = $row->details->display ?? NULL; @endphp @if (isset($row->details->formfields_custom)) @include('voyager::formfields.custom.' . $row->details->formfields_custom) @else @endif @endif @endforeach

{{ __('voyager::post.details') }}

@include('voyager::multilingual.input-hidden', [ '_field_name' => 'slug', '_field_trans' => get_field_translations($dataTypeContent, 'slug') ])
featured) && $dataTypeContent->featured) checked="checked"@endif>

{{ __('voyager::post.image') }}

@if(isset($dataTypeContent->image)) @endif

{{ __('voyager::post.seo_content') }}

@include('voyager::multilingual.input-hidden', [ '_field_name' => 'meta_description', '_field_trans' => get_field_translations($dataTypeContent, 'meta_description') ])
@include('voyager::multilingual.input-hidden', [ '_field_name' => 'meta_keywords', '_field_trans' => get_field_translations($dataTypeContent, 'meta_keywords') ])
@include('voyager::multilingual.input-hidden', [ '_field_name' => 'seo_title', '_field_trans' => get_field_translations($dataTypeContent, 'seo_title') ])
@section('submit-buttons') @stop @yield('submit-buttons')
{{ csrf_field() }}
@stop @section('javascript') @stop