{{-- @include('admin.includes.translatable-fields', ['translatedAttributesMeta' => App\Models\Book::$translatedAttributesMeta]) --}}

Translations

@foreach(config('translatable.locales') as $locale)

{{strtoupper($locale)}}

@foreach(collect($translatedAttributesMeta)->sortBy('order') as $fieldName => $fieldMeta) @if(!isset($autoTranslate))
{!!Form::{$fieldMeta['type']}( $locale . '[' . $fieldName . ']', isset($object) ? optional($object->translate($locale))->{$fieldName} : null, ['class' => $fieldMeta['type'] == 'textarea' ? 'froala' : 'form-control countInput'] )!!}
@if($fieldMeta['type'] == 'text') 0 / {{isset($fieldMeta['max_chars']) ? $fieldMeta['max_chars'] : '200'}} @endif
@else @livewire('admin.input-field-translate', [ 'object' => isset($object) ? $object : null, 'fieldName' => $fieldName, 'fieldMeta' => $fieldMeta, 'locale' => $locale ]) @endif @endforeach
@endforeach