1
0
cms11/resources/views/components/asides/links.blade.php
2024-05-09 01:13:12 +02:00

30 lines
779 B
PHP

@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, '://'))
<a href="{{ League\Uri\Uri::new($item) }}">[1]</a>
@else
<p>{{ $item }}</p>
@endif
@else
@php
$index++;
@endphp
@if(Str::contains($key, '://'))
<a href="{{ League\Uri\Uri::new($key) }}">[{{ $index }}]</a>
@else
{{ $key }}
@endif
@endif
@endforeach
</div>
</div>