dym-sh/resources/views/components/nav-link.blade.php

6 lines
338 B
PHP
Raw Normal View History

2024-08-07 14:01:03 +02:00
<a href="{{ str_starts_with(request()->path(), $slot) ? '/' : '/'.$slot.'/' }}"
title="{{ $slot }}"
aria-current="{{ str_starts_with(request()->path(), $slot) ? 'true' : 'false' }}"
{{ $attributes->merge(['class' => str_starts_with(request()->path(), $slot ) ? 'current' : '' ])}}
><span class="hidden">{{ $slot }}</span></a>