Form Control: Input Text

 
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
    <label for="name" class="control-label">Name</label>
    <input type="text" class="form-control" name="name" 
        value="{{ old('name', $rec->name) }}"
    >

    @if ($errors->has('name'))
    <span class="help-block">
        <strong>{{ $errors->first('name') }}</strong>
    </span>
    @endif
</div>


<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
    <label class="col-md-4 control-label">Name</label>
    <div class="col-md-6">
        <input type="text" class="form-control" name="name" 
            value="{{ old('name', $rec->name) }}"
        >

        @if ($errors->has('name'))
        <span class="help-block">
            <strong>{{ $errors->first('name') }}</strong>
        </span>
        @endif
    </div>
</div>

 

Related Snippets

•  Form Control: Select - Dropdown
•  Form Tag
•  Query Builder: Get max value of a field