@extends('layouts.admin') @section('page-title', 'Products') @section('content')
{{-- Add New Product --}} Add New Product @if(session('success'))
{{ session('success') }}
@endif {{-- Loop categories --}} @foreach($categories as $category)

{{ $category }}

@if(isset($products[$category]) && count($products[$category]) > 0) @foreach($products[$category] as $product)
@if($product->image) @endif
{{ $product->title }}

{{ $product->description }}

{{-- Edit button --}} Edit {{-- Delete button --}} Delete
@endforeach @else

No products available in this category.

@endif
@endforeach
@endsection