ldc-agis/resources/views/bo/partials/inputs/varchar-email.blade.php
2023-12-21 13:56:34 +01:00

34 lines
1.4 KiB
PHP

{{-- blade-formatter-disable --}}
{{--
VARIABLE || COMMENT || TYPE || REQUIRED || DEFAULT
$id || The id of the input tag. || string || REQUIRED ||
$name || The name of the input tag. || string || REQUIRED ||
$helper || The helper of the input. || string || REQUIRED ||
$label || The text displayed as a label. || string || OPTIONNAL || null
$required || Is the field required ? || boolean || OPTIONNAL || false
$placeholder || The placeholder of the input. || string || OPTIONNAL || __('aaa.bbb@example.com')
$model || The model we're creating/editing || Model class || OPTIONNAL || null
--}}
@if (!empty($label))
<label class="col-form-label" for="{{ $id }}">
<b>{{ $label }} {{ $required ?? false ? '*' : '' }}</b>
</label>
@endif
<input
name="{{ $name }}"
type="email"
value="{{ old($name, $model->{$name} ?? '') }}"
class="form-control @if ($errors->has($name)) is-invalid @endif"
id="{{ $id }}"
aria-describedby="{{ $id }}Help"
placeholder="{{ $placeholder ?? __('aaa.bbb@example.com') }}"
@disabled(!empty($disabled))
@readonly(!empty($readonly))
@required(!empty($required))>
@include('modules.input-error', [
'inputName' => $name,
'helperId' => "{$id}Help",
'helper' => $helper,
])