<div class="row">
    <div class="col-md-6 col-md-offset-3">
	     <div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
            <label class="control-label">Category <span class="text-danger">*</span></label>
            {!! Form::select('category_id',App\Model\Category::all()->pluck('name','id')->toArray() ,null, ['class' => 'form-control']) !!}
            <span class="help-block" id="error_category_id"><strong>{{ $errors->first('category_id') }}</strong></span>
        </div>
        <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
            <label class="control-label">Name <span class="text-danger">*</span></label>
            {!! Form::text('name',null, ['class' => 'form-control']) !!}
            <span class="help-block" id="error_name"><strong>{{ $errors->first('name') }}</strong></span>
        </div>
		<div class="form-group {{ $errors->has('description') ? ' has-error' : '' }}">
            <label class="control-label">Description <span class="text-danger"></span></label>
            {!! Form::textarea('description', null, ['class'=>'form-control','id'=>'description']) !!}
            <span class="help-block" id="error_name"><strong>{{ $errors->first('description') }}</strong></span>
        </div>
		<div class="form-group {{ $errors->has('image') ? ' has-error' : '' }}">
            <label class="control-label">Image <span class="text-danger">*</span></label>
            {!! Form::file('image', ['class' => 'form-control thumb_image']) !!}
            <span class="help-block" id="error_image"><strong>{{ $errors->first('image') }}</strong></span>
        </div>
    </div>
	<div class="col-md-3 text-center" >
        <img src="{{ !empty($record['image'])?$record['image_url']:url('public/assets/admin/images/not-available.jpg') }}" id="thumb_image" width="150" />
    </div>
</div>
@section('js')
<script type="text/javascript">
    CKEDITOR.config.removeButtons = 'Image';
	CKEDITOR.replace('description');
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $('.datepicker').datepicker({
            autoclose: true,
            format: 'yyyy-mm-dd',
            todayHighlight: true,
            todayBtn: true,
            startDate: '0d',
        });
    });
</script>
<script type="text/javascript">
	$(function () {
		$('.timepicker').datetimepicker({
			 format:'HH:mm'
		});
	});
</script>
@endsection
