php - Update with files won't submit laravel -
i'm working on laravel project need file upload. have managed file upload create function working, edit()
, update()
functions, won't. main problem form won't submit. here import pits of form:
<form action="{{route('ads.update', $ad->id)}}" class="form-horizontal" method="post" enctype="multipart/form-data"> <input type="hidden" name="_method" value="patch"> <input type="hidden" name="_token" value="{{ csrf_token() }}"><div class="form-group"> <label for="imageupload" class="control-label col-md-4">@lang('image upload')</label> <div class="col-md-6"> <input type="file" name="images[]" class="form-control" multiple="multiple"> </div> </div><input type="submit" value="أضف التعديل" class="btn btn-success btn-block btn-default"> </form>
whenever delete section of code, form submits , update()
works flawlessly
<div class="form-group"> <label for="imageupload" class="control-label col-md-4">@lang('image upload')</label> <div class="col-md-6"> <input type="file" name="images[]" class="form-control" multiple="multiple"> </div>
things i've tried:
- changing enctype put
- changing method patch put
thanks in advance help
Comments
Post a Comment