{"id":25171505,"url":"https://github.com/basemax/megamenuphp","last_synced_at":"2025-04-03T21:21:51.403Z","repository":{"id":47552814,"uuid":"499381874","full_name":"BaseMax/MegaMenuPHP","owner":"BaseMax","description":"MegaMenuPHP is a simple menu system for PHP that allows you to recursively get menu items and its submenus.","archived":false,"fork":false,"pushed_at":"2022-06-03T09:07:31.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T17:08:10.310Z","etag":null,"topics":["mega-menu","megamenu","menu","mysql","php","recursive","recursive-algorithm","recursive-functions","sql"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-03T04:45:42.000Z","updated_at":"2022-07-21T02:45:48.000Z","dependencies_parsed_at":"2022-09-12T01:30:26.814Z","dependency_job_id":null,"html_url":"https://github.com/BaseMax/MegaMenuPHP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FMegaMenuPHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FMegaMenuPHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FMegaMenuPHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FMegaMenuPHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/MegaMenuPHP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247079308,"owners_count":20880030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mega-menu","megamenu","menu","mysql","php","recursive","recursive-algorithm","recursive-functions","sql"],"created_at":"2025-02-09T09:20:42.111Z","updated_at":"2025-04-03T21:21:51.373Z","avatar_url":"https://github.com/BaseMax.png","language":"PHP","readme":"# Mega Menu PHP\n\n**MegaMenuPHP** is a simple menu system for PHP that allows you to recursively get menu items and its submenus.\n\n## Using\n\n```sh\n$ php menu.php\n```\n\n### Tree\n\n```\n- Personal cabinet\n- News\n     - Sub Test 1\n          - Sub Test 2\n- Sitemap\n     - Sub Test 1\n          - Sub Test 2\n- Information\n     - Sub Test 1\n          - Sub Test 2\n- Contacts\n- System\n     - Official site\n     - Supporting forum\n```\n\n### Test Table Data\n\n**Menu:**\n\n| ID | Menu ID | Parent ID|\n|----|---------|----------|\n| 1 | 1 | NULL |\n| 2 | 2 | NULL |\n| 3 | 3 | NULL |\n| 4 | 4 | NULL |\n| 5 | 5 | NULL |\n| 6 | 6 | NULL |\n| 7 | 7 | 6 |\n| 8 | 8 | 6 |\n| 9 | 9 | 2 |\n| 10 | 9 | 3 |\n| 11 | 9 | 4 |\n| 12 | 10 | 9 |\n\n**Menu Item:**\n\n| ID | Name |\n|----|------|\n| 1 | Personal cabinet |\n| 2 | News |\n| 3 | Sitemap |\n| 4 | Information |\n| 5 | Contacts |\n| 6 | System |\n| 7 | Official site |\n| 8 | Supporting forum |\n| 9 | Sub Test 1 |\n| 10, | Sub Test 2 |\n\n### Tree Array\n\n```\nArray\n(\n    [0] =\u003e Array (\n            [id] =\u003e 1\n            [name] =\u003e Personal cabinet\n        )\n    [1] =\u003e Array (\n            [id] =\u003e 2\n            [name] =\u003e News\n            [children] =\u003e Array (\n                    [0] =\u003e Array (\n                            [id] =\u003e 9\n                            [name] =\u003e Sub Test 1\n                            [children] =\u003e Array\n                                (\n                                    [0] =\u003e Array\n                                        (\n                                            [id] =\u003e 10\n                                            [name] =\u003e Sub Test 2\n                                        )\n                                )\n                        )\n                )\n        )\n    [2] =\u003e Array (\n            [id] =\u003e 3\n            [name] =\u003e Sitemap\n            [children] =\u003e Array (\n                    [0] =\u003e Array (\n                            [id] =\u003e 9\n                            [name] =\u003e Sub Test 1\n                            [children] =\u003e Array (\n                                    [0] =\u003e Array\n                                        (\n                                            [id] =\u003e 10\n                                            [name] =\u003e Sub Test 2\n                                        )\n                                )\n                        )\n                )\n        )\n    [3] =\u003e Array (\n            [id] =\u003e 4\n            [name] =\u003e Information\n            [children] =\u003e Array (\n                    [0] =\u003e Array (\n                            [id] =\u003e 9\n                            [name] =\u003e Sub Test 1\n                            [children] =\u003e Array (\n                                    [0] =\u003e Array (\n                                            [id] =\u003e 10\n                                            [name] =\u003e Sub Test 2\n                                        )\n                                )\n                        )\n                )\n        )\n    [4] =\u003e Array (\n            [id] =\u003e 5\n            [name] =\u003e Contacts\n        )\n    [5] =\u003e Array (\n            [id] =\u003e 6\n            [name] =\u003e System\n            [children] =\u003e Array (\n                    [0] =\u003e Array (\n                            [id] =\u003e 7\n                            [name] =\u003e Official site\n                        )\n                    [1] =\u003e Array (\n                            [id] =\u003e 8\n                            [name] =\u003e Supporting forum\n                        )\n                )\n        )\n)\n```\n\n### Database Structure\n\n```sql\nCREATE TABLE `menu` (\n  `id` int(20) NOT NULL,\n  `menu_id` int(20) NOT NULL,\n  `parent_id` int(20) DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n\nCREATE TABLE `menu_item` (\n  `id` int(20) NOT NULL,\n  `name` varchar(54) NOT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n```\n\n© Copyright 2022, Max Base\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fmegamenuphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fmegamenuphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fmegamenuphp/lists"}