the_manish_sharma's avatar

Show Subcategory ON Images Blade Page

I Want To Show Subcategory Page On Images Page But View All Subcategory On Images Page

One can tell that the category whose images only show the subcategory of that category

@foreach( App\Models\SubCategories::where('subcategories_id', $response->subcategories_id)->get() as $subcategories )

                         <?php 
                          if( $subcategories->thumbnail == '' ) {
                         $_image = 'default.jpg';
                          } else {
                               $_image = $subcategories->thumbnail;
                          }
                          ?>     
  • {{ $subcategories->name }}

  • @endforeach

    View

    more

    @endif
    0 likes
    5 replies
    the_manish_sharma's avatar

    @Sinnbeck I Want To Show Subcategory Page On Images Page But View All Subcategory On Images Page

    want to show the same category's subcategory on my images page. But when I am using foreach loop then all subcategory view is happening.

    <div class="projects-catalog" style=" margin-bottom: -15px;margin-top: -10px;"> 
    <div class="catalog-cover"> 
    <i class="left-button"></i> 
    <ul class="sliderWrapper1 sliderscroll">
    @foreach( App\Models\SubCategories::where('subcategories_id', $response->categories_id)->get() as $subcategories )
                                
                                <?php 
                                 if( $subcategories->thumbnail == '' ) {
                                $_image = 'default.jpg';
                                 } else {
                                      $_image = $subcategories->thumbnail;
                                 }
                                 ?>     
    <li class="slide"> <a class="slink sq" href="{{ url('s',$subcategories->slug) }}"> <img height="80" width="102" loading="lazy" class="img-circle sqtags" src="{{asset('public/img-category')}}/{{ $_image }}"> <div class="sidekro chapta"> <p>{{ $subcategories->name }}</p>  </div> </a> </li>
    @endforeach
    <a class="slink viewmore" href="{{ url('c', $response->category->slug) }}"> <div class="sidekro viewmore1" style="margin: 4px;"> <p>View</p> <p>more</p> </div> </a> 
    </ul>
    </div>
    </div>
    </div>```
    

    Please or to participate in this conversation.