42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
@if(!empty($label))
|
|
<label for="{{ $id }}" class="col-form-label">
|
|
<b>{{ $label }} {{ $required ? '*' : '' }}</b>
|
|
</label>
|
|
@endif
|
|
<div class="input-group">
|
|
<input id="{{ $id }}"
|
|
name="{{ $name }}"
|
|
type="number"
|
|
value="{{ Str::replace(',', '.', strval(old($name, $value ?? $model->{$name} ?? 0))) }}"
|
|
class="form-control"
|
|
aria-describedby="{{ $id }}Help"
|
|
@if(!empty($step))
|
|
step="{{ Str::replace(',', '.', strval($step)) }}"
|
|
@else
|
|
step="1"
|
|
@endif
|
|
@if(!empty($max))
|
|
max="{{ $max }}"
|
|
@else
|
|
max="{{ !empty($unsigned) ? '4294967295' : '2147483647' }}"
|
|
@endif
|
|
@if(!empty($min))
|
|
min="{{ $min }}"
|
|
@else
|
|
min="{{ !empty($unsigned) ? '0' : '-2147483648' }}"
|
|
@endif
|
|
@if(!empty($placeholder))
|
|
placeholder="{{ $placeholder }}"
|
|
@endif
|
|
@if(!empty($required))
|
|
required
|
|
@endif>
|
|
@if(isset($appendText))
|
|
<label class="input-group-text">{{ $appendText }}</label>
|
|
@endif
|
|
</div>
|
|
@include('modules.input-error', [
|
|
'inputName' => $name,
|
|
'helperId' => $id.'Help',
|
|
'helper' => $helper
|
|
])
|