@if (count($products) > 0)
S.N. |
Title |
Category |
Featured |
Price |
Discount |
Size |
Condition |
Brand |
Stock |
Photo |
Status |
Action |
S.N. |
Title |
Category |
Featured |
Price |
Discount |
Size |
Condition |
Brand |
Stock |
Photo |
Status |
Action |
@foreach ($products as $product)
@php
$sub_cat_info = DB::table('categories')
->select('title')
->where('id', $product->child_cat_id)
->get();
// dd($sub_cat_info);
$brand = DB::table('brands')
->where('id', $product->brand_id)
->first();
@endphp
{{ $product->id }} |
{{ $product->title }} |
{{-- {{ $product->cat_info['title']}} --}}
{{ $product->sub_cat_info->title ?? '' }}
|
{{ $product->is_featured == 1 ? 'Yes' : 'No' }} |
Rs. {{ $product->price }} /- |
{{ $product->discount }}% OFF |
{{ $product->size }} |
{{ $product->condition }} |
@if ($brand)
{{ ucfirst($brand->title) }}
@else
No Brand
@endif
|
@if ($product->stock > 0)
{{ $product->stock }}
@else
{{ $product->stock }}
@endif
|
@if ($product->photo)
@else
@endif
|
@if ($product->status == 'active')
{{ $product->status }}
@else
{{ $product->status }}
@endif
|
|
@endforeach
{{ $products->links() }}
@else
No Products found!!! Please create Product
@endif