@extends('layouts.dashboard') @section('content')

products

products

products
@foreach ($products as $sl=>$product) @php $after_explode = explode(',', $product->category_id); @endphp {{-- --}} @endforeach
SL Image Product Category Sku Stock Price Sale Price Status Actions
{{$sl+1}} {{$product->product_name}} @foreach ($after_explode as $category_id) @php $categorys = App\Models\Category::where('id', $category_id)->get(); @endphp @foreach ($categorys as $category) {{ $category->category_name }}, @endforeach @endforeach {{$after_explode->rel_to_category->category_name}}{{$product->sku}} {{$product->quantity}} {{$product->product_price}} {{$product->product_discount}} {{$product->status == 1 ? 'Active' : 'Deactive'}}
@endsection