all_category.blade.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. @extends('frontend.layouts.app')
  2. @section('content')
  3. <section class="pt-4 mb-4">
  4. <div class="container text-center">
  5. <div class="row">
  6. <div class="col-lg-6 text-center text-lg-left">
  7. <h1 class="fw-600 h4">{{ translate('All Categories') }}</h1>
  8. </div>
  9. <div class="col-lg-6">
  10. <ul class="breadcrumb bg-transparent p-0 justify-content-center justify-content-lg-end">
  11. <li class="breadcrumb-item opacity-50">
  12. <a class="text-reset" href="{{ route('home') }}">{{ translate('Home')}}</a>
  13. </li>
  14. <li class="text-dark fw-600 breadcrumb-item">
  15. <a class="text-reset" href="{{ route('categories.all') }}">"{{ translate('All Categories') }}"</a>
  16. </li>
  17. </ul>
  18. </div>
  19. </div>
  20. </div>
  21. </section>
  22. <section class="mb-4">
  23. <div class="container">
  24. @foreach ($categories as $key => $category)
  25. <div class="mb-3 bg-white shadow-sm rounded">
  26. <div class="p-3 border-bottom fs-16 fw-600">
  27. <a href="{{ route('products.category', $category->slug) }}" class="text-reset">{{ $category->getTranslation('name') }}</a>
  28. </div>
  29. <div class="p-3 p-lg-4">
  30. <div class="row">
  31. @foreach (\App\Utility\CategoryUtility::get_immediate_children_ids($category->id) as $key => $first_level_id)
  32. <div class="col-lg-4 col-6 text-left">
  33. <h6 class="mb-3"><a class="text-reset fw-600 fs-14" href="{{ route('products.category', \App\Models\Category::find($first_level_id)->slug) }}">{{ \App\Models\Category::find($first_level_id)->getTranslation('name') }}</a></h6>
  34. <ul class="mb-3 list-unstyled pl-2">
  35. @foreach (\App\Utility\CategoryUtility::get_immediate_children_ids($first_level_id) as $key => $second_level_id)
  36. <li class="mb-2">
  37. <a class="text-reset" href="{{ route('products.category', \App\Models\Category::find($second_level_id)->slug) }}" >{{ \App\Models\Category::find($second_level_id)->getTranslation('name') }}</a>
  38. </li>
  39. @endforeach
  40. </ul>
  41. </div>
  42. @endforeach
  43. </div>
  44. </div>
  45. </div>
  46. @endforeach
  47. </div>
  48. </section>
  49. @endsection