i'm new to laravel. I need to set current Navbar Link to Active-Color in Laravel without using blade
i'm try when i use blade :- {{(request()->is('label')) ? 'active' : '' }}
{{(request()->is('label')) ? 'active' : '' }}
but i need active class without using laravel blad ?
Code where i add Active class :-
$str .= '<li class="loader-visible" id="id'.$favObj->artist_id.'">';
i try :-
$str .= '<li class="loader-visible '.request()->is("label") ? "active" : "" .'" id="id'.$favObj->artist_id.'">';
But Not Working
1.4m articles
1.4m replys
5 comments
56.9k users