38 lines
1.9 KiB
PHP
38 lines
1.9 KiB
PHP
<div class="container">
|
|
<div class="row rounded m-0 drop-shadow bg-white p-2">
|
|
<div class="col mb-4">
|
|
@for ($i = 0; $i < round(count($category['children']) / 3); $i++)
|
|
<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'] }}
|
|
</a><br>
|
|
@endforeach
|
|
@endfor
|
|
</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>
|
|
@foreach ($category['children'][$i]['children'] ?? [] as $leaf)
|
|
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $leaf['id']]) }}">
|
|
{{ $leaf['name'] }}
|
|
</a><br>
|
|
@endforeach
|
|
@endfor
|
|
</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>
|
|
@foreach ($category['children'][$i]['children'] ?? [] as $leaf)
|
|
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $leaf['id']]) }}">
|
|
{{ $leaf['name'] }}
|
|
</a><br>
|
|
@endforeach
|
|
@endfor
|
|
</div>
|
|
</div>
|
|
</div> |