@extends('backend.layouts.master') @section('main-content')
@include('backend.layouts.notification')
Product Lists
Add Product
@if (count($products) > 0) @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 @endforeach
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
{{ $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) {{ $product->photo }} @else avatar.png @endif @if ($product->status == 'active') {{ $product->status }} @else {{ $product->status }} @endif
@csrf @method('delete')
{{ $products->links() }} @else
No Products found!!! Please create Product
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush