MenuCRUD | admin panel for menu items | Menu library
kandi X-RAY | MenuCRUD Summary
kandi X-RAY | MenuCRUD Summary
An admin panel for menu items on Laravel 5 or Laravel 6, using Backpack\CRUD. Add, edit, reorder, nest, rename menu items and link them to Backpack\PageManager pages, external link or custom internal link. Usually used for front-end menus, not back-end. Adding a menu item in MenuCRUD will not add an item in the admin sidebar, though you can easily customize Backpack\Base's sidebar.blade.php to show all menu items in the db, if you'd like. Security updates and breaking changes Please subscribe to the Backpack Newsletter so you can find out about any security updates, breaking changes or major features. We send an email every 1-2 months.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Setup menu items .
- Get the menu tree
- Return the URL for this item .
- Create menu items .
- Setup the routes .
- Register the package services .
- Register routes .
- Migrate menu items .
- Parent item .
MenuCRUD Key Features
MenuCRUD Examples and Code Snippets
Community Discussions
Trending Discussions on MenuCRUD
QUESTION
I installed the MenuCRUD from the Backpack Add-On list:
https://github.com/Laravel-Backpack/MenuCRUD#usage-in-your-template
and I put the example code into my blade, but it only shows the first level menu items, as expected.
This is the code I use:
...ANSWER
Answered 2021-Nov-07 at 12:37if you take a look at the https://github.com/Laravel-Backpack/MenuCRUD/blob/b4a64a454985f8203efa166a2d5dfebc304d2a48/src/app/Models/MenuItem.php#L34
the method you call returns a collection of menu items. Each menu item has an array of children
. This is what actually your debug info shows.
So you should do smth like that:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install MenuCRUD
Download the latest build.
Paste the 'app' and 'database' folders over your projects (merge them). No file overwrite warnings should come up.
Replace all mentions of 'Backpack\MenuCRUD\app' in the pasted files with your application's namespace ('App' if you haven't changed it):
app/Http/Controllers/Admin/MenuItemCrudController.php
app/Models/MenuItem.php
Run the migration to have the database table we need:
Add MenuCRUD to your routes file:
[optional] Add a menu item for it in resources/views/vendor/backpack/base/inc/sidebar.blade.php or menu.blade.php:
In your terminal, run:
Publish the migration:
Run the migration to have the database table we need:
[optional] Add a menu item for it in resources/views/vendor/backpack/base/inc/sidebar_content.blade.php or menu.blade.php:
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page