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

Discover Products

@auth Submit a Product @endauth
All Categories @foreach($categories as $category) {{ $category->name }} @endforeach
@if(session('success')) @endif
@forelse($products as $product)
@if($product->thumbnail_url) {{ $product->title }} @else
No image
@endif
{{ $product->title }}

{{ $product->category->name }}

{{ Str::limit($product->description, 100) }}

By {{ $product->user->name }} ยท {{ $product->created_at->diffForHumans() }}
@empty
No products found. Be the first to submit one!
@endforelse
{{ $products->links() }}
@endsection