@extends('admin.layouts.app') @section('content')

imgProduct

@forelse($product as $val) @php $categoryNames = []; foreach ($val->categories as $category) { $categoryNames[] = $category->name; } @endphp @empty @endforelse
# Name Brand Category Price Sale Price Stock New Arrival Featured Actions

{{ $loop->index + 1 }}

{{ $val->name }} {{ $val->brand->name }}{{ implode('/', $categoryNames ?? '') }} {{ $val->price }} @if (!empty($val->sale)) {{ $val->sale_price }} @endif {{ $val->stock_quantity }} {{ $val->new_arrival }} {{ $val->featured }}
Data not found!
{{ $product->links() }}
@endsection