private static function setParams($menuLink)
    {
        $menuLinkParams = self::decodeParams($menuLink->params);
        $routeParams = Route::getRoutes()->getByName($menuLink->routeName)->parameterNames();
        $params = [];
        foreach($routeParams as $key){
            if(isset($menuLinkParams[$key])) {
                $params[$key] = $menuLinkParams[$key];
            }
        }
        return $params;
    }
private static function setParams($menuLink)
    {
        $menuLinkParams = self::decodeParams($menuLink->params);
        $routeParams = Route::getRoutes()->getByName($menuLink->routeName)->parameterNames();
        $params = [];
        foreach($routeParams as $key){
            if(isset($menuLinkParams[$key])) {
                $params[$key] = $menuLinkParams[$key];
            }
        }
        return $params;
    }
private static function setParams ( $ menuLink ) { $ menuLinkParams = self :: decodeParams ( $ menuLink -> params ) ; $ routeParams = Route :: getRoutes ( ) -> getByName ( $ menuLink -> routeName ) -> parameterNames ( ) ; $ params = [ ] ; foreach ( $ routeParams as $ key ) { if ( isset ( $ menuLinkParams [ $ key ] ) ) { $ params [ $ key ] = $ menuLinkParams [ $ key ] ; } } return $ params ; }
Find which params belongs to an action and gets their values from Menu Links Params

@param  object $menuLink
@return array Returns final params with values
Find which params belongs to an action and gets their values from Menu Links Params