<div class="form-group {{ ($errors->first('name')) ? "has-error" : ""}}">
    {{ Form::label('name',Trans('stock.stock')) }}
    {{ Form::text('name', null, [
      'class' => 'form-control',
      'placeholder' => Trans('stock.stock'),
      'required'    => 'required'
    ]) }}
    @if($errors->first('name'))
      <span class="help-block">{{$errors->first('name')}}</span>
    @endif
  </div>
  <div class="form-group">
    {{ Form::label('branch_id',Trans('dashboard.branches.branch')) }}
    <?php
    $selected = (isset($stock->branch_id)) ? $stock->branch_id : '';
    ?>
    {{ Form::select('branch_id',$branches,$selected,['class' => 'form-control']) }}
  </div>
<div class="form-group">
  {{ Form::label('description',Trans('item_locations.description')) }}
  {{ Form::textarea('description', null,
    [
      'class' => "form-control",
      'placeholder' => Trans('item_locations.description'),
      'rows' => "3"
    ]
  )}}
</div>
<div class="form-group">
    <button type="submit" name="submit" class="btn btn-primary">{{ (isset($stock)) ? Trans('dashboard.crud.update') : Trans('dashboard.crud.add') }}</button>
    <button type="reset" name="button" class="btn btn-default">{{ Trans('dashboard.crud.reset')}}</button>
</div>
