This commit is contained in:
Ludovic CANDELLIER
2022-04-22 02:32:53 +02:00
parent 94234218d6
commit e4672a42d7
5 changed files with 21 additions and 4 deletions

View File

@@ -16,7 +16,11 @@
</div>
<div class="col mb-4">
@for ($i = round(count($category['children']) / 3); $i < round(2 * count($category['children']) / 3); $i++)
<strong>{{ $category['children'][$i]['name'] }}</strong><br>
<strong>
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $category['children'][$i]['id']]) }}">
{{ $category['children'][$i]['name'] }}
</a>
</strong><br>
@foreach ($category['children'][$i]['children'] ?? [] as $leaf)
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $leaf['id']]) }}">
{{ $leaf['name'] }}
@@ -26,7 +30,11 @@
</div>
<div class="col mb-4">
@for ($i = round(2 * count($category['children']) / 3); $i < count($category['children']); $i++)
<strong>{{ $category['children'][$i]['name'] }}</strong><br>
<strong>
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $category['children'][$i]['id']]) }}">
{{ $category['children'][$i]['name'] }}
</a>
</strong><br>
@foreach ($category['children'][$i]['children'] ?? [] as $leaf)
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $leaf['id']]) }}">
{{ $leaf['name'] }}