{!! Form::open(['url' => route('updateDetailImage',['id'=>$detail->id]),'method' => 'put','files'=>true]) !!}
{!! Form::hidden('code',$detail->detail_code) !!}
<div class="modal-body container-fluid">
  @if(Session::has('message-addimage'))
    <div id="message-addimage" class="alert {{ Session::get('alert-class') }} alert-dismissible" role="alert">
      <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      <p>{{ Session::get('message-addimage') }}</p>
    </div>
  @endif

  <div class="col-xs-12">
    <div class="form-group image-with-preview">
      <img class="prev-img img-bordered img-responsive" alt="product-image" src="{{ asset($storage_url.'img/products/'.$detail->detail_code.'/'.$detail->detail_image) }}">
      {!! Form::label('product_image','Choose an Image',['class'=>'control-label']) !!}

      <div class="{{ $errors->has('product_image') ? ' has-error' : '' }}">
        {!! Form::file('product_image',['class'=>'form-control','data-fileinput'=>'image']) !!}
        @if ($errors->has('product_image'))
            <span class="help-block">
                <strong>{{ $errors->first('product_image') }}</strong>
            </span>
        @endif
        <br>
        <div class="upload-rules text-left">
          <ul>
            <li>@lang('backend.min-resolution') <strong>300 x 450 px</strong></li>
            <li>@lang('backend.file-type') <strong>*.jpg / *.jpeg</strong></li>
            <li>@lang('backend.max-file-size') <strong>1mb</strong></li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="modal-footer">
  <button type="submit" class="btn btn-primary">@lang('backend.save')</button>
  <button class="btn btn-default" data-dismiss="modal">@lang('backend.cancel')</button>
</div>
{!! Form::close() !!}
