public static function getActionOfLink($menuLink)
    {
        //post type
        if($menuLink->belongsTo == "post_type") {
            return route(
                'backend.post.index', [
                'post_type' => "post_".$menuLink->params->postTypeSlug,
                'view' => 'list'
                ]
            );
        }
        // posts
        else if(substr($menuLink->belongsTo, 0, 5) == "post_" && $menuLink->belongsTo != "post_type") {
            //handle single post
            if(isset($menuLink->params->postSlug)) {
                return route(
                    'backend.post.single', [
                    'post_type' => $menuLink->belongsTo,
                    'view' => 'update',
                    'id' => $menuLink->belongsToID
                    ]
                );
            }
            //posts list
            else{
                $postType = PostType::findByID($menuLink->belongsToID);
                if($postType) {
                    return route(
                        'backend.post.index', [
                        'post_type' => $postType->slug,
                        'view' => 'list'
                        ]
                    );
                }
            }

        }

        //categories
        else if($menuLink->belongsTo == "category" || $menuLink->belongsTo == "categories") {
            $category = Category::findByID($menuLink->belongsToID);
            if($category) {
                $postType = PostType::findByID($category->postTypeID);
                if ($postType) {
                    return route(
                        'backend.post.index', [
                        'post_type' => $postType->slug,
                        'view' => 'list',
                        'categoryID' => $menuLink->belongsToID
                        ]
                    );
                }
            }
        }
        return;
    }