PATH:
home
/
lab2454c
/
.trash
/
core
/
resources
/
views
/
templates
/
basic
/
user
/
product
/
image
@if(old("image_id.0") != NULL) @php $i = 0; @endphp @while (old("image_id.".$i) != NULL) <tr> <td> <input type="hidden" name="image_id[{{$i}}]" value="{{ old("image_id.".$i) }}"> <div class="row"> <div class="col-md-12 mb-20"> <label for="file" class="form--label mb-2">@lang('File') (Accept only video & image)<sup class="text--danger">*</sup></label> <input class="form-control form--control-2 bg--body" type="file" id="file" name="image[0]" required="" accept="image/*,video/*"> </div> </div> </td> <td width='5%'> <a href='javascript:void(0);' class='remove' style="padding-top: 2.4rem;"> <i class='fa fa-minus-circle remove-icon'></i> </a> </td> </tr> @php ++$i; @endphp @endwhile @elseif(isset($product) && $product->productImages->count() > 0) @foreach($product->productImages as $i=>$productImage) <tr> <td> <input type="hidden" name="image_id[{{$i}}]" value="{{ $productImage->id }}"> <div class="row"> <div class="col-md-8 mb-20"> <label for="file" class="form--label mb-2">@lang('File') (Accept only video & image)<sup class="text--danger">*</sup></label> <input class="form-control form--control-2 bg--body" type="file" id="file" name="image[{{$i}}]" accept="image/*,video/*"> </div> <div class="col-md-4 mb-20"> @php $imageName = explode('.', $productImage->file); $ext = $imageName[count($imageName) - 1]; @endphp @if($ext == 'mp4' || $ext == 'mov') <video width="240" height="240" controls> <source src="{{ asset('assets/images/product/'.$productImage->file) }}" type="video/mp4"> Your browser does not support the video tag. </video> @else <img src="{{ asset('assets/images/product/'.$productImage->file) }}" width="50%"> @endif </div> </div> </td> <td width='5%'> <a href='javascript:void(0);' class='remove' style="padding-top: 2.4rem;"> <i class='fa fa-minus-circle remove-icon'></i> </a> </td> </tr> @endforeach @else <tr> <td> <input type="hidden" name="image_id[0]" value="0"> <div class="row"> <div class="col-md-12 mb-20"> <label for="file" class="form--label mb-2">@lang('File') (Accept only video & image)<sup class="text--danger">*</sup></label> <input class="form-control form--control-2 bg--body" type="file" id="file" name="image[0]" required="" accept="image/*,video/*"> </div> </div> </td> <td width='5%'> <a href='javascript:void(0);' class='remove' style="padding-top: 2.4rem;"> <i class='fa fa-minus-circle remove-icon'></i> </a> </td> </tr> @endif
[+]
..
[-] image-row.blade.php
[edit]
[-] image-content.blade.php
[edit]