PHP Classes

File: resources/views/frontend/partials/product-sidebar.blade.php

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   Laravel Ecommerce Site   resources/views/frontend/partials/product-sidebar.blade.php   Download  
File: resources/views/frontend/partials/product-sidebar.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Laravel Ecommerce Site
Application to sell products using Laravel
Author: By
Last change:
Date: 1 year ago
Size: 1,204 bytes
 

Contents

Class file image Download

<div class="list-group">
  @foreach (App\Models\Category::orderBy('name', 'asc')->where('parent_id', NULL)->get() as $parent)
    <a href="#main-{{ $parent->id }}" class="list-group-item list-group-item-action" data-toggle="collapse">
      <img src="{!! asset('images/categories/'.$parent->image) !!}" width="50">
      {{ $parent->name }}
    </a>
    <div class="collapse
      @if (Route::is('categories.show'))
        @if (App\Models\Category::ParentOrNotCategory($parent->id, $category->id))
          show
        @endif
      @endif
    " id="main-{{ $parent->id }}">
      <div class="child-rows">
        @foreach (App\Models\Category::orderBy('name', 'asc')->where('parent_id', $parent->id)->get() as $child)
          <a href="{!! route('categories.show', $child->id) !!}" class="list-group-item list-group-item-action
            @if (Route::is('categories.show'))
              @if ($child->id == $category->id)
                active
              @endif
            @endif
            ">
            <img src="{!! asset('images/categories/'.$child->image) !!}" width="30">
            {{ $child->name }}
          </a>
        @endforeach
      </div>


    </div>
  @endforeach
</div>