{!! Form::model($category, ['route' => ['backend.categories.image.store', $category->id], 'class' => 'form-horizontal',
'method' =>
'POST', 'files' => true]) !!}
<div class="modal-header no-border">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
            aria-hidden="true">&times;</span></button>
    <h4 class="modal-title">
        Ajouter/Modifier l'image
    </h4>
</div>
<div class="modal-body">

    <div class="col-md-12">
        <div class="form-group">
            <label for="values">Catégorie</label>
            {{ Form::text('name', null, ['class' => 'form-control', 'required' => 'required']) }}
        </div>
        <div class="form-group">
            <label for="values">Image</label>
            @if(isset($category->image) && !empty($category->image))
            <div>
                <img src="{{ asset('storage/categories/' . $category->image) }}" class="" style="max-width: 300px">
            </div>
            <div class="checkbox">
                <label>
                    <input type="checkbox" name="delete_image" value="1"> Supprimer l'image
                </label>

            </div>
            <br>
            @endif
            {{ Form::file('image', null, ['class' => 'form-control', 'required' => 'required'])  }}
            @if(isset($category->image) && !empty($category->image))
            <p class="help-block">Pour modifier l'image selectionneez une autre </p>
            @endif
        </div>

    </div>

</div>

<div class="modal-footer no-border">
    <button type="button" class="btn btn-danger pull-left" data-dismiss="modal">Fermer</button>
    <button type="submit" class="btn btn-success">Enregistrer</button>
</div>
{!! Form::close() !!}