{{-- Load images from session --}}
@if (session()->has('newtemp_images'))
@foreach (session('newtemp_images') as $img)
@endforeach
@endif
@error('images')
{{ $message }}
@enderror
@error('images.*')
{{ $message }}
@enderror
@error('category_id')
{{ $message }}
@enderror
@if (auth()->user()->role === 'admin')
@elseif (in_array(auth()->user()->role, ['sakthi', 'smart_world', 'chendur_traders', 'yoga_naturals', 'branch_admin']))
@php
$roleToBranchName = [
'sakthi' => 'Sakthi Super Mart',
'smart_world' => 'SMARTWORLD',
'chendur_traders' => 'CHENDUR TRADERS',
'yoga_naturals' => 'Yogaa Naturals',
'branch_admin' => auth()->user()->name,
];
$userRole = auth()->user()->role;
$branchName = $roleToBranchName[$userRole] ?? null;
$userBranch = $branches->firstWhere('branch_name', $branchName);
@endphp
@else
@endif
{{--
--}}
Specialization
@php
$oldVariants = old('variants', []);
$variantIndex = 1;
@endphp
@foreach ($oldVariants as $index => $variant)
Variant {{ $variantIndex }}
@php $variantIndex++; @endphp
@endforeach