@lostdreamer_nl I need brands that match the category_id only sir but it displays for all the categories not for the particular categories

suppose if i have smart phone as category all the brands gets displayed in the smart phone category not the brands which relates to the smart phone!!


@lostdreamer_nl example phone,tablets,refrigirator(subcategories)

  1. for both smart phone and tablets i have brands like (samsung,sony)

3.but the logic written shows brands (samsung,sony) for refrigirator also it should not show right??


@lostdreamer_nl i have tried with below logic also to show only for particualr subcategory(naming variable not good)

@foreach ($brand as $category)

    @foreach ($category->brands as $brand)

@if($category->id == $brand->category_id)

        {{ $brand->name }} <input type="checkbox"><br>


Please sign in or create an account to participate in this conversation.