我想避免 @elseif 语句应用正则表达式。尝试了一些方法但没有任何运气。
@if(request()->is('*backend/categories*')) active @elseif(request()->is('*backend/products*')) active @endif
更新:
<a href="#" class="nav-link @if(request()->is('*backend/categories*')) active @elseif(request()->is('*backend/products*')) active @endif">
慕容3067478