private function getPostSelectedCategories($id, $postTypeSlug)
    {
        // get the selected categories from the DB table categories_relations
        $categoryRelationTable = $postTypeSlug.'_categories';
        $selectedCategories = DB::table($categoryRelationTable)
            ->leftJoin('categories', $categoryRelationTable.'.categoryID', 'categories.categoryID')
            ->where($categoryRelationTable.'.postID', $id)
            ->select("categories.categoryID", "categories.postTypeID", "categories.title", "categories.slug")
            ->get();

        return Language::filterRows($selectedCategories, false);
    }