@section('title', 'Merchandise') @section('top-menu-items') @section('top-menu-items') @endsection @endsection @section('sub-menu-items') @endsection
@can('write_product-addons') Add Add-Ons @endcan
Selected
{{-- --}} @can('write_product-addons') @endcan @foreach ($products as $product) {{-- --}} @php $productNames = $product->applicableProducts; $colors = ['#FF5733', '#33FF57', '#3357FF', '#FF33A1', '#FF8C33', '#A133FF', '#33FFF5', '#F5FF33', '#FF3333', '#33FF8C']; @endphp @can('write_product-addons') @endcan @endforeach
Addons Name Applicable Products Revenue Type Price Tax Availability Actions
{{ $product->name }} @if($productNames->isNotEmpty()) @foreach($productNames as $index => $applicableProduct) @php $randomColor = $colors[$index % count($colors)]; @endphp {{ $applicableProduct->name }} @endforeach @else N/A @endif {{ $product->revenue_type }} {{ $product->price }} @if ($product->taxes->isEmpty()) null @else @foreach ($product->taxes as $tax) {{ $tax->name }} ({{ $tax->percentage }}%)
@endforeach @endif
{{ $product->availability ? 'Available' : 'Not Available' }} Actions
@push('styles') @endpush @push('scripts') @endpush