@extends('frontend.layout.app')

@section('content')
<section class="pt-4 mb-4">
    <div class="container">
        <div class="row">
            <div class="col-lg-3 text-center ">
                <h1 class="fw-600 h4">All Categories</h1>
            </div>
            <div class="col-lg-9">
                <ul class="breadcrumb bg-transparent p-0 justify-content-center justify-content-lg-end">
                    <li class="breadcrumb-item opacity-50">
                        <a class="text-reset" href="{{ route('home') }}">Home</a>
                    </li>
                    <li class="text-dark fw-600 breadcrumb-item">
                        <a class="text-reset" href="">All Categories</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</section>
<section class="mb-2">
    <div class="container">
            <div class="row gutters-10 row-cols-xxl-3 ">
                    @foreach($categories as $category)

                    <div class="col">
                            <div class="row">
                                <div class="col-4">
                                    <a href="" class="d-block p-3" tabindex="0">
                                    <img src={{ asset('/storage/'.$category->banner) }} height="100px" >
                                    </a>
                                </div>
                            </div>
                            <div class="col-8 border-left border-light">
                                    <div class="p-3 text-left">
                                        <h4 class="product-name">
                                            <a href="{{ route('categoryproducts',[$category->id]) }}"  tabindex="0">{{$category->name }}</a>
                                        </h4>
                                        <div class="rating rating-sm mb-2">
                                        </div>
                                        <div class="mt-2">
                                        <a href={{ route('categoryproducts',[$category->id]) }} class="btn btn2"> View </a>
                                        </div>
                                    </div>
                                </div>
                    </div>            



                    @endforeach
                 </div>
</div>  
</section>

@endsection