Download the PHP package proshore/menu-management without Composer
On this page you can find all versions of the php package proshore/menu-management. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download proshore/menu-management
More information about proshore/menu-management
Files in proshore/menu-management
Package menu-management
Short Description A database based menu managment system for laravel backend
License MIT
Informations about the package menu-management
menu-management
A database based Menu managment with Bootstrap for Laravel 5.5
This package will create a menu management module in your backend. The menu management can be used to dynamically store menu in the database and can be used in front end. There are three types of menu present: Internal Menu, External menu and CMS pages menu.
This package is solely prepare to help build database based menu management and may have some unknown glitches. Please report issues if you find one.
Installation
- Require this package with composer.
Laravel 5.5 uses Package Auto-Discovery, so you don't have to manually add the package to the ServiceProvider.
-
Publish the config file.
- Run migration `
- Create a seed file for menu. THe seed file should create a container for menu table. THey may be header, footer.
Terms
- Menu: The main container of menu where all menu items are listed
- MenuItem: the actual menu inside the container
- Status: Active/Inactive
- Target Group: Defining which menu shoudl be visible for which users
- Type: Different type of menu. Internal menu, External Link, CMS pages
- Parent: Defining the parent menu
Publishing
Publishing the config file
`
Publishing views
If you want to override your view then please run the following command and make necessary changes `
Documentation
To change the main layout path. Select your backend default layout
Default stack to push your javascript file
Prefix of your backend section. Leave empty if there is no prefix. `
If you need to use extra middleware, append middleware in the following configuration `
The bootstrap class for table view and form view `
The target group for which you want to create menu. These are basically the role in the frontend. Based upon this array, you need to create a logic in frontend for displaying the menu. In below example, the 0 => All, 1 => Visitors and 2 => Registered user. Use this key in the facade for targetgroup. `
In order to have CMS pages link to menu, please add the full namespace model name, the primary key of the table and name of the page to display in drodown. Make sure the cms page table has slug field as well.
`
To pull the menu array in frontend, use the available facade. ContainerName is the name of the menu container and targetgroup is the key of the role. ``
Contributor
Babish Shrestha