27 lines
926 B
PHP
27 lines
926 B
PHP
{{-- $id : id de l'input --}}
|
|
{{-- $label : Libellé de l'input --}}
|
|
{{-- $name : name de l'input --}}
|
|
{{-- $model : instance du model --}}
|
|
{{-- $required : l'input est obligatoire ? (true/false) --}}
|
|
{{-- $placeholder : texte visible dans l'input lorsque son contenu est vide --}}
|
|
{{-- $helper : texte visible en dessous de l'input --}}
|
|
<label for="{{ $id }}" class="col-form-label">
|
|
<b>{{ $label }} {{ $required ? '*' : '' }}</b>
|
|
</label>
|
|
@php
|
|
$data = [
|
|
'id' => $id,
|
|
'class' => 'form-control',
|
|
'name' => $name,
|
|
'placeholder' => $placeholder,
|
|
'ariaDescribedby' => "{$id}Help",
|
|
'required' => $required,
|
|
'value' => old($name, $model->{$name} ?? '')
|
|
];
|
|
@endphp
|
|
<div class="input-text-auto" data-json='@json($data)'></div>
|
|
@include('modules.input-error', [
|
|
'inputName' => $name,
|
|
'helperId' => $id."Help",
|
|
'helper' => $helper
|
|
])
|