samedi 17 novembre 2018

Why did highlight all sidebar menu items in Laravel 5.6?

working with laravel 5.6 and I have bootstrap sidemenu items, like this

<li class="">
    <a href="">All Users</a></li>

    <li class="">
    <a href="">Category Chart</a></li>

    <li class="">
    <a href="">Category Static</a></li>

I have helper function for this sidemenu in app/helper/Helper.php

<?php

if(! function_exists('active_menu')) {
    function active_menu($currentRouteName, $requestName, $start, $finish){
        if (substr($currentRouteName,$start, $finish) == $requestName){
            return 'active';

        }else{
            return null;
        }
    }
    }

but when I click one menu link above highlight all menu links. problem is here in the all links, it is highlight all menu witch include 'reports', 0,7

'reports', 0,7

how can I fix this problem?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire