Hey, I had a similar problem, and it was because I was using bootstrap 4 instead of bootstrap 3, and many things are changed.
Nov 1, 2018
8
Level 4
Not working bootstrap navbar with <ul class=“nav nav-sidebar”> in Laravel 5.6
in my laravel application I have sidebar menu like following,
<ul class="nav navbar-nav">
<li class="{{ active_menu(Route::CurrentRouteName(), 'welcome', 0,7)}}">
<a href="{{route('welcome')}}">Home</a></li>
<li class="{{ active_menu(Route::CurrentRouteName(), 'page1', 0,5)}}">
<a href="{{route('page1')}}">Page 1</a></li>
<li><a href="#">Page 2</a></li>
<li><a href="#">Page 3</a></li>
</ul>
this is working with Helper.php file in app/Helper/Helper.php3
<?php
if(! function_exists('active_menu')) {
function active_menu($currentRouteName, $requestName, $start, $finish){
if (substr($currentRouteName,$start, $finish) == $requestName){
return 'active';
}else{
return null;
}
}
}
this is working fine, but now I need change above sidemenu bar class as following,
<ul class="nav nav-sidebar">
only this change but now it is not working. how can I fix this problem?
Please or to participate in this conversation.