{"id":15700897,"url":"https://github.com/efectn/laravel-menu-builder","last_synced_at":"2025-08-24T01:07:23.407Z","repository":{"id":57675695,"uuid":"483989475","full_name":"efectn/laravel-menu-builder","owner":"efectn","description":"Wordpress like drag \u0026 drop menu builder for Laravel 9.x","archived":false,"fork":false,"pushed_at":"2024-06-30T15:17:58.000Z","size":244,"stargazers_count":8,"open_issues_count":5,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T07:55:37.852Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/efectn.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-21T09:32:50.000Z","updated_at":"2024-12-13T05:13:29.000Z","dependencies_parsed_at":"2024-10-24T05:25:36.096Z","dependency_job_id":"6ed81dcd-7c6e-4e23-8b6d-787b834cf816","html_url":"https://github.com/efectn/laravel-menu-builder","commit_stats":{"total_commits":122,"total_committers":19,"mean_commits":6.421052631578948,"dds":0.7540983606557377,"last_synced_commit":"be2a517d183ce5c0d4242240000aa5cdb0831d49"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/efectn/laravel-menu-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efectn%2Flaravel-menu-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efectn%2Flaravel-menu-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efectn%2Flaravel-menu-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efectn%2Flaravel-menu-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efectn","download_url":"https://codeload.github.com/efectn/laravel-menu-builder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efectn%2Flaravel-menu-builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271778236,"owners_count":24819265,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-03T19:55:55.449Z","updated_at":"2025-08-24T01:07:23.367Z","avatar_url":"https://github.com/efectn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drag and Drop Menu Builder for Laravel 9.x, 10.x and 11.x\n\n[![Latest Stable Version](https://poser.pugx.org/efectn/laravel-menu-builder/v/stable)](https://packagist.org/packages/efectn/laravel-menu-builder) [![Latest Unstable Version](https://poser.pugx.org/efectn/laravel-menu-builder/v/unstable)](https://packagist.org/packages/efectn/laravel-menu-builder) [![Total Downloads](https://poser.pugx.org/efectn/laravel-menu-builder/downloads)](https://packagist.org/packages/efectn/laravel-menu-builder) [![Monthly Downloads](https://poser.pugx.org/efectn/laravel-menu-builder/d/monthly)](https://packagist.org/packages/efectn/laravel-menu-builder)\n\nOriginally forked from [harimayco/wmenu-builder](https://github.com/harimayco/wmenu-builder), but under active maintenance. \n\n![Laravel drag and drop menu](https://raw.githubusercontent.com/efectn/wmenu-builder/master/screenshot.png)\n\n### Installation\n\n1. Run\n\n```php\ncomposer require efectn/laravel-menu-builder\n```\n\n2. Add facade in the config/app.php (optional )\n\n```php\n'Menu' =\u003e Efectn\\Menu\\Facades\\Menu::class,\n```\n\n4. Run publish to get configs, views, assets and migrations.\n\n```php\nphp artisan vendor:publish --provider=\"Efectn\\Menu\\MenuServiceProvider\"\n```\n\n5. Configure (optional) in **_config/menu.php_** :\n\n- **_CUSTOM MIDDLEWARE:_** You can add you own middleware\n- **_TABLE PREFIX:_** By default this package will create 2 new tables named \"menus\" and \"menu_items\" but you can still add your own table prefix avoiding conflict with existing table\n- **_TABLE NAMES_** If you want use specific name of tables you have to modify that and the migrations\n- **_Custom routes_** If you want to edit the route path you can edit the field\n- **_Role Access_** If you want to enable roles (permissions) on menu items\n\n6. Run migrate\n\n```php\nphp artisan migrate\n```\n\nDONE\n\n### Menu Builder Usage Example - displays the builder\n\nOn your view blade file\n\n```php\n@extends('app')\n\n@section('contents')\n    {!! Menu::render() !!}\n@endsection\n\n//YOU MUST HAVE JQUERY LOADED BEFORE menu scripts\n@push('scripts')\n    {!! Menu::scripts() !!}\n@endpush\n```\n\n### Using The Model\n\nCall the model class\n\n```php\nuse Efectn\\Menu\\Models\\Menus;\nuse Efectn\\Menu\\Models\\MenuItems;\n\n```\n\n### Menu Usage Example (a)\n\nA basic two-level menu can be displayed in your blade template\n\n##### Using Model Class\n```php\n\n/* get menu by id*/\n$menu = Menus::find(1);\n/* or by name */\n$menu = Menus::where('name','Test Menu')-\u003efirst();\n\n/* or get menu by name and the items with EAGER LOADING (RECOMENDED for better performance and less query call)*/\n$menu = Menus::where('name','Test Menu')-\u003ewith('items')-\u003efirst();\n/*or by id */\n$menu = Menus::where('id', 1)-\u003ewith('items')-\u003efirst();\n\n//you can access by model result\n$public_menu = $menu-\u003eitems;\n\n//or you can convert it to array\n$public_menu = $menu-\u003eitems-\u003etoArray();\n\n```\n\n##### or Using helper\n```php\n// Using Helper \n$public_menu = Menu::getByName('Public'); //return array\n\n```\n\n### Menu Usage Example (b)\n\nNow inside your blade template file place the menu using this simple example\n\n```php\n\u003cdiv class=\"nav-wrap\"\u003e\n    \u003cdiv class=\"btn-menu\"\u003e\n        \u003cspan\u003e\u003c/span\u003e\n    \u003c/div\u003e\u003c!-- //mobile menu button --\u003e\n    \u003cnav id=\"mainnav\" class=\"mainnav\"\u003e\n\n        @if($public_menu)\n        \u003cul class=\"menu\"\u003e\n            @foreach($public_menu as $menu)\n            \u003cli class=\"\"\u003e\n                \u003ca href=\"{{ $menu['link'] }}\" title=\"\"\u003e{{ $menu['label'] }}\u003c/a\u003e\n                @if( $menu['child'] )\n                \u003cul class=\"sub-menu\"\u003e\n                    @foreach( $menu['child'] as $child )\n                        \u003cli class=\"\"\u003e\u003ca href=\"{{ $child['link'] }}\" title=\"\"\u003e{{ $child['label'] }}\u003c/a\u003e\u003c/li\u003e\n                    @endforeach\n                \u003c/ul\u003e\u003c!-- /.sub-menu --\u003e\n                @endif\n            \u003c/li\u003e\n            @endforeach\n        @endif\n\n        \u003c/ul\u003e\u003c!-- /.menu --\u003e\n    \u003c/nav\u003e\u003c!-- /#mainnav --\u003e\n \u003c/div\u003e\u003c!-- /.nav-wrap --\u003e\n```\n\n### HELPERS\n\n### Get Menu Items By Menu ID\n\n```php\nuse Efectn\\Menu\\Facades\\Menu;\n...\n/*\nParameter: Menu ID\nReturn: Array\n*/\n$menuList = Menu::get(1);\n```\n\n### Get Menu Items By Menu Name\n\nIn this example, you must have a menu named _Admin_\n\n```php\nuse Efectn\\Menu\\Facades\\Menu;\n...\n/*\nParameter: Menu ID\nReturn: Array\n*/\n$menuList = Menu::getByName('Admin');\n```\n\n### Customization\n\nyou can edit the menu interface in **_resources/views/vendor/menu-builder/menu-html.blade.php_**\n\n### Credits\n\n- [wmenu](https://github.com/lordmacu/wmenu) - laravel package menu like wordpress\n- [wmenu-builder](https://github.com/harimayco/wmenu-builder) - Laravel Drag and Drop Dynamic Menu Generator (Wordpress look alike)\n\n### Compatibility\n\n- Tested with Laravel 9.x.\n\n### Known Issues\n**Note:** Look at https://github.com/efectn/laravel-menu-builder/issues/1.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefectn%2Flaravel-menu-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefectn%2Flaravel-menu-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefectn%2Flaravel-menu-builder/lists"}