@php $isEdit = !empty($entity); $action = $isEdit ? action([\App\Http\Controllers\HoldingController::class, 'updateEntity'], [$entity->id]) : action([\App\Http\Controllers\HoldingController::class, 'storeEntity']); @endphp {!! Form::open(['url' => $action, 'method' => $isEdit ? 'put' : 'post', 'id' => 'holding_entity_form']) !!}

{{ $isEdit ? __('lang_v1.holding_edit_entity') : __('lang_v1.holding_add_entity') }}

{!! Form::label('name', __('lang_v1.name') . ':*') !!} {!! Form::text('name', $entity->name ?? null, ['class' => 'form-control', 'required', 'placeholder' => __('lang_v1.name')]) !!}
{!! Form::label('code', __('lang_v1.holding_code') . ':') !!} {!! Form::text('code', $entity->code ?? null, ['class' => 'form-control', 'placeholder' => __('lang_v1.holding_code')]) !!}
{!! Form::label('entity_type', __('lang_v1.type') . ':*') !!} {!! Form::select('entity_type', $entityTypes, $entity->entity_type ?? 'company', ['class' => 'form-control select2', 'required']) !!}
  
{!! Form::close() !!}