custom texonomy category child category list with parent head

well i just got a solution like this >>

                        <?php 

                        $taxonomyName = "com_category";
                        $parent_terms = get_terms($taxonomyName, array('parent' => 0, 'orderby' => 'slug', 'hide_empty' => false));   

                        foreach ($parent_terms as $pterm) {
                            $terms = get_terms($taxonomyName, array('parent' => $pterm->term_id, 'orderby' => 'slug', 'hide_empty' => false));
                            foreach ($terms as $term) {
                                echo '<div class="single_cat col-md-3">';
                                echo '<h3>'.$pterm->name.'</h3>'; 
                                echo "<ul>";
                                echo '<li><a href="' . get_term_link( $term->name, $taxonomyName ) . '">' . $term->name . '</a></li>'; 
                                echo "</ul>";
                                echo '</div>'; 
                            }
                        }


                         ?>