<div class="form-group {{ $errors->has('vendor_id') ? 'has-error' : ''}}">
    <label for="vendor_id" class="control-label">{{ 'Vendor Id' }}</label>
    <input class="form-control" name="vendor_id" type="number" id="vendor_id" value="{{ isset($post->vendor_id) ? $post->vendor_id : ''}}" >
    {!! $errors->first('vendor_id', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('category_id') ? 'has-error' : ''}}">
    <label for="category_id" class="control-label">{{ 'Category Id' }}</label>
    <input class="form-control" name="category_id" type="number" id="category_id" value="{{ isset($post->category_id) ? $post->category_id : ''}}" >
    {!! $errors->first('category_id', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('name') ? 'has-error' : ''}}">
    <label for="name" class="control-label">{{ 'Name' }}</label>
    <input class="form-control" name="name" type="text" id="name" value="{{ isset($post->name) ? $post->name : ''}}" >
    {!! $errors->first('name', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('model_name') ? 'has-error' : ''}}">
    <label for="model_name" class="control-label">{{ 'Model Name' }}</label>
    <input class="form-control" name="model_name" type="text" id="model_name" value="{{ isset($post->model_name) ? $post->model_name : ''}}" >
    {!! $errors->first('model_name', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('model_number') ? 'has-error' : ''}}">
    <label for="model_number" class="control-label">{{ 'Model Number' }}</label>
    <input class="form-control" name="model_number" type="text" id="model_number" value="{{ isset($post->model_number) ? $post->model_number : ''}}" >
    {!! $errors->first('model_number', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('registered_number') ? 'has-error' : ''}}">
    <label for="registered_number" class="control-label">{{ 'Registered Number' }}</label>
    <input class="form-control" name="registered_number" type="text" id="registered_number" value="{{ isset($post->registered_number) ? $post->registered_number : ''}}" >
    {!! $errors->first('registered_number', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('brand') ? 'has-error' : ''}}">
    <label for="brand" class="control-label">{{ 'Brand' }}</label>
    <input class="form-control" name="brand" type="text" id="brand" value="{{ isset($post->brand) ? $post->brand : ''}}" >
    {!! $errors->first('brand', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('duration') ? 'has-error' : ''}}">
    <label for="duration" class="control-label">{{ 'Duration' }}</label>
    <input class="form-control" name="duration" type="text" id="duration" value="{{ isset($post->duration) ? $post->duration : ''}}" >
    {!! $errors->first('duration', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('duration_type') ? 'has-error' : ''}}">
    <label for="duration_type" class="control-label">{{ 'Duration Type' }}</label>
    <input class="form-control" name="duration_type" type="text" id="duration_type" value="{{ isset($post->duration_type) ? $post->duration_type : ''}}" >
    {!! $errors->first('duration_type', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('asset_type') ? 'has-error' : ''}}">
    <label for="asset_type" class="control-label">{{ 'Asset Type' }}</label>
    <input class="form-control" name="asset_type" type="text" id="asset_type" value="{{ isset($post->asset_type) ? $post->asset_type : ''}}" >
    {!! $errors->first('asset_type', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('cost') ? 'has-error' : ''}}">
    <label for="cost" class="control-label">{{ 'Cost' }}</label>
    <input class="form-control" name="cost" type="text" id="cost" value="{{ isset($post->cost) ? $post->cost : ''}}" >
    {!! $errors->first('cost', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('description') ? 'has-error' : ''}}">
    <label for="description" class="control-label">{{ 'Description' }}</label>
    <textarea class="form-control" rows="5" name="description" type="textarea" id="description" >{{ isset($post->description) ? $post->description : ''}}</textarea>
    {!! $errors->first('description', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('image') ? 'has-error' : ''}}">
    <label for="image" class="control-label">{{ 'Image' }}</label>
    <textarea class="form-control" rows="5" name="image" type="textarea" id="image" >{{ isset($post->image) ? $post->image : ''}}</textarea>
    {!! $errors->first('image', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('weight') ? 'has-error' : ''}}">
    <label for="weight" class="control-label">{{ 'Weight' }}</label>
    <input class="form-control" name="weight" type="text" id="weight" value="{{ isset($post->weight) ? $post->weight : ''}}" >
    {!! $errors->first('weight', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('size') ? 'has-error' : ''}}">
    <label for="size" class="control-label">{{ 'Size' }}</label>
    <input class="form-control" name="size" type="text" id="size" value="{{ isset($post->size) ? $post->size : ''}}" >
    {!! $errors->first('size', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('return_policy') ? 'has-error' : ''}}">
    <label for="return_policy" class="control-label">{{ 'Return Policy' }}</label>
    <textarea class="form-control" rows="5" name="return_policy" type="textarea" id="return_policy" >{{ isset($post->return_policy) ? $post->return_policy : ''}}</textarea>
    {!! $errors->first('return_policy', '<p class="help-block">:message</p>') !!}
</div>
<div class="form-group {{ $errors->has('status') ? 'has-error' : ''}}">
    <label for="status" class="control-label">{{ 'Status' }}</label>
    <select name="status" class="form-control" id="status" >
    @foreach (json_decode('{0: 0, 1: 1}', true) as $optionKey => $optionValue)
        <option value="{{ $optionKey }}" {{ (isset($post->status) && $post->status == $optionKey) ? 'selected' : ''}}>{{ $optionValue }}</option>
    @endforeach
</select>
    {!! $errors->first('status', '<p class="help-block">:message</p>') !!}
</div>


<div class="form-group">
    <input class="btn btn-primary" type="submit" value="{{ $formMode === 'edit' ? 'Update' : 'Create' }}">
</div>
