Update Product Picture
@if (session('error'))
{{ session('error') }}
@endif
@if (!session('product'))
@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)
 }})
@elseif ($externalImageExists)

@else
No Image Available
@endif
Product Details
- ID: {{ session('product')->id }}
- Name: {{ session('product')->pname }}
- Code: {{ session('product')->code }}
- Price: ${{ session('product')->price }}
@if (!session('success') && session('product')->showdel === 2)
@endif
@endif
@if (session('success'))
Update Next
@endif