Show existing images on user edit page

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-07-20 00:27:28 +01:00
parent 32c768792a
commit fc86eefeac

View file

@ -1,6 +1,6 @@
<!-- Image stuff - kept in /resources/views/partials/forms/edit/image-upload.blade.php --> <!-- Image stuff - kept in /resources/views/partials/forms/edit/image-upload.blade.php -->
<!-- Image Delete --> <!-- Image Delete -->
@if (isset($item) && ($item->image) && ($item->image!='')) @if (isset($item) && ($item->{($fieldname ?? 'image')}))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3"> <div class="col-md-9 col-md-offset-3">
<label class="form-control"> <label class="form-control">
@ -12,7 +12,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-md-9 col-md-offset-3"> <div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url($image_path.e($item->image)) }}" class="img-responsive"> <img src="{{ Storage::disk('public')->url($image_path.e($item->{($fieldname ?? 'image')})) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!} {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div> </div>
</div> </div>