ldc-gen-game-web/resources/views/partials/inputs/varchar-email.blade.php
2023-11-27 12:04:19 +01:00

25 lines
1.3 KiB
PHP

{{--
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 class="form-control @if ($errors->has($name)) is-invalid @endif" id="{{ $id }}" name="{{ $name }}"
type="email" value="{{ old($name, $model->{$name} ?? '') }}" aria-describedby="{{ $id }}Help"
placeholder="{{ $placeholder ?? __('aaa.bbb@example.com') }}" @if (!empty($required)) required @endif>
@include('modules.input-error', [
'inputName' => $name,
'helperId' => '{{ $id }}Help',
'helper' => $helper,
])