Update Product Picture

@if (session('error'))
{{ session('error') }}
@endif @if (!session('product'))
@csrf @if ($errors->has('id'))
{{ $errors->first('id') }}
@endif
@else @php $picXL = session('product')->pic_XL; $picXL = str_replace('../', '/', $picXL); $picXLPath = $picXL ? public_path($picXL) : null; $picXLPathExists = file_exists($picXLPath); if (!$picXLPathExists) { // Check if external image exists $externalImageUrl = config('app.assets_url') . $picXL; $externalImageExists = false; if ($picXL) { $headers = @get_headers($externalImageUrl); $externalImageExists = $headers && strpos($headers[0], '200') !== false; } } @endphp
@if ($picXLPathExists) Product Image uploaded @elseif ($externalImageExists) Product Image Meena @else
No Image Available
@endif

Product Details

@if (!session('success') && session('product')->showdel === 2)
@csrf @if ($errors->has('pic_XL'))
{{ $errors->first('pic_XL') }}
@endif
@endif
@endif @if (session('success'))

Update Next

@csrf @if ($errors->has('id'))
{{ $errors->first('id') }}
@endif
@endif