proshore/menu-management
Composer 安装命令:
composer require proshore/menu-management
包简介
A database based menu managment system for laravel backend
关键字:
README 文档
README
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.
composer require proshore/menu-management
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
php artisan migrate
- 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
php artisan vendor:publish --tag=config
Publishing views
If you want to override your view then please run the following command and make necessary changes
php artisan vendor:publish --tag=views
Documentation
To change the main layout path. Select your backend default layout
'layout-extend-path' => 'layouts.layout'
Default stack to push your javascript file
'script-stack' => 'scripts',
Prefix of your backend section. Leave empty if there is no prefix.
'prefix' => 'admin',
If you need to use extra middleware, append middleware in the following configuration
'middleware' => ['web', 'auth'],
The bootstrap class for table view and form view
'table-class' => 'table table-striped table-hover', 'form-class' => 'menu-item',
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.
'target-group' => ['All', 'Visitors', 'Registerd Users'],
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.
'cms' => [ 'model' => 'App\Page', 'key' => 'id', 'value' => 'name', ],
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.
MenuManagement::getMenuByContainer($containerName, $targetGroup)
Contributor
Babish Shrestha
proshore/menu-management 适用场景与选型建议
proshore/menu-management 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 665 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 12 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「menu」 「backend」 「management」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 proshore/menu-management 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 proshore/menu-management 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 proshore/menu-management 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Symfony extension to get active class base on current bundle/controller/action
This bundle offers a simple backend explanation form field (inputType).
Preview of settings in footer of tt_content element in page module.
An interactive tour through the TYPO3 backend.
crud widgets for laravel, to make an admin in few lines of code
A Silverstripe module to allow you to log into any of your Silverstripe sites from one place.
统计信息
- 总下载量: 665
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-12-11