@extends ('admin.layouts.default') @section ('main')

@php echo (isset($sharing)) ? __('labels.sharing.edit_sharing') : __('labels.sharing.create_sharing'); @endphp

@include('admin.partials.x-toolbar') @php $action = (isset($sharing)) ? route('admin.memberships.sharings.update', $query) : route('admin.memberships.sharings.store', $query) @endphp
@csrf @if (isset($sharing)) @method('put') @endif @php $value = (isset($sharing)) ? old('name', $fields[0]->value) : old('name'); @endphp @php array_shift($fields); // Remove the very first field (ie: title) from the array. @endphp
@foreach ($fields as $key => $field) @if (isset($field->tab)) @php $active = ($field->tab == 'details') ? 'show active' : ''; $dataTab = $field->tab; @endphp
@endif @if (isset($field->tab) || (isset($field->extra) && in_array('new_row', $field->extra)))
@endif
@php $value = (isset($sharing)) ? old($field->name, $field->value) : old($field->name); @endphp
@if (isset($fields[$key + 1]->tab) || (isset($fields[$key + 1]->extra) && in_array('new_row', $fields[$key + 1]->extra)) || !isset($fields[$key + 1]))
@endif @if (!next($fields) || isset($fields[$key + 1]->tab))
@endif @endforeach
@if (isset($sharing)) @else @include('admin.partials.sharing.document-sharing') @endif @if (isset($sharing)) @include('admin.partials.sharing.document-sharing')
@method('put') @csrf
@method('delete') @csrf
@endif @endsection @push ('style') @endpush @push ('scripts') @endpush