ldc-supportweb/resources/views/bo/partials/inputs/pivot-belongsToMany.blade.php
2025-04-17 16:24:27 +02:00

21 lines
594 B
PHP

@if(!empty($label))
<label for="{{ $id }}" class="col-form-label">
<b>{{ $label }} {{ $required ? '*' : '' }}</b>
</label>
@endif
@php
$data = [
'name' => $name,
'value' => old($name, $model->{$name} ?? []) ?? [],
'placeholder' => $placeholder,
'itemsList' => $itemsList,
'itemLimit' => $itemLimit ?? null,
'errors' => $errors->getBag('default')->getMessages() ?? []
];
@endphp
<div class="belongs-to-many-dropdown" data-json='@json($data)'></div>
@include('modules.input-error', [
'inputName' => $name,
'helperId' => $id."Help",
'helper' => $helper,
])