{{ $title }}
@if(isset($record)) @php $id=$record->id @endphp @else @php $id=0 @endphp @endif
@if(isset($record->image)) @php $image=$record->image @endphp @php $imageUrl=asset(Storage::url('products/'.$record->product_id.'/'.$record->image)) @endphp @elseif(old('image')) @php $image=old('image'); @endphp $imageUrl="" @else @php $image=''; $imageUrl="" @endphp @endif
@if(isset($record->video)) @php $video=$record->video @endphp @php $videoUrl=asset(Storage::url('products/'.$record->product_id.'/'.$record->video)) @endphp @elseif(old('video')) @php $video=old('video'); @endphp $videoUrl="" @else @php $video=''; $videoUrl="" @endphp @endif
@php $visible_type=0; @endphp @if(isset($record->visible_type)) @if($record->visible_type=='V') @php $visible_type=1 @endphp @endif @elseif(old('visible_type')) @php $visible_type=old('visible_type'); @endphp @else @php $visible_type=0; @endphp @endif  
@if(isset($record->color_id)) @php $color_id=$record->color_id @endphp @elseif(old('color_id')) @php $color_id=old('color_id'); @endphp @else @php $color_id=0; @endphp @endif
@if(isset($record->price)) @php $price=$record->price @endphp @elseif(old('price')) @php $price=old('price'); @endphp @else @php $price=''; @endphp @endif
@if(isset($record->discounted_price)) @php $discounted_price=$record->discounted_price @endphp @elseif(old('discounted_price')) @php $discounted_price=old('discounted_price'); @endphp @else @php $discounted_price=''; @endphp @endif
@if(isset($record->description)) @php $description=$record->description @endphp @elseif(old('description')) @php $description=old('description'); @endphp @else @php $description=''; @endphp @endif
@if(isset($record->rank)) @php $rank=$record->rank @endphp @elseif(old('rank')) @php $rank=old('rank'); @endphp @else @php $rank=''; @endphp @endif
@if(isset($record->active)) @php $active=$record->active @endphp @elseif(old('active')) @php $active=old('active'); @endphp @else @php $active=1; @endphp @endif
 

List Images:    
@if(isset($record)) @foreach($record->images as $key=>$image) @php $imageUrl=asset(Storage::url('products/'.$image->product_id.'/'.$image->image)) @endphp
@endforeach @endif