1
0
cms11/resources/views/components/asides/links.blade.php

30 lines
813 B
PHP
Raw Normal View History

2024-04-26 13:47:36 +02:00
@props(['subCategory', 'items', 'bundle'])
@php
$index = 0;
@endphp
<div class="two-columns">
<h4>{!! $subCategory !!}</h4>
<div>
@foreach($items as $key => $item)
@if(is_string($item))
@if(Str::contains($item, '://'))
2024-05-12 00:07:04 +02:00
{!! App\Models\Url::from($item, $bundle)->toHtmlElement('[1]') !!}
2024-04-26 13:47:36 +02:00
@else
<p>{{ $item }}</p>
@endif
@else
@php
$index++;
@endphp
@if(Str::contains($key, '://'))
2024-05-12 00:07:04 +02:00
{!! App\Models\Url::from($key, $bundle)->toHtmlElement('[' . $index . ']') !!}
2024-04-26 13:47:36 +02:00
@else
{{ $key }}
@endif
@endif
@endforeach
</div>
</div>