28 lines
1.4 KiB
PHP
28 lines
1.4 KiB
PHP
@stack($name . '_input_start')
|
|
|
|
<div
|
|
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
|
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
|
@if (isset($attributes['show']))
|
|
v-if="{{ $attributes['show'] }}"
|
|
@endif
|
|
>
|
|
@if (!empty($text))
|
|
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
|
@endif
|
|
|
|
{!! Form::textarea($name, $value, array_merge([
|
|
'class' => 'form-control',
|
|
'data-name' => $name,
|
|
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
|
'@input' => !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event.target.value' : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name . ' = $event.target.value' : 'form.' . $name . ' = $event.target.value'),
|
|
], $attributes)) !!}
|
|
|
|
<div class="invalid-feedback d-block"
|
|
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has("' . $name . '")' }}"
|
|
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}">
|
|
</div>
|
|
</div>
|
|
|
|
@stack($name . '_input_end')
|