定制 soeurngsar/menubuilder 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

soeurngsar/menubuilder

Composer 安装命令:

composer require soeurngsar/menubuilder

包简介

drag and drop menu generator like wordpress for laravel backpack

README 文档

README

forked from https://github.com/lordmacu/wmenu Laravel drag and drop menu for backpack

Note

This package is work perfectly with Backpack and require minimum version of 4.0

Installation

  1. Run
composer require soeurngsar/menubuilder
  1. Run publish assets
php artisan vendor:publish --provider="SoeurngSar\MenuBuilder\MenuServiceProvider"
  1. Configure (optional) in config/menu.php :
  • CUSTOM MIDDLEWARE: You can add you own middleware
  • 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
  • TABLE NAMES If you want use specific name of tables you have to modify that and the migrations
  • Custom routes If you want to edit the route path you can edit the field
  1. Run migrate
php artisan migrate

DONE

Usage Example

On your view blade file for admin

@section('contents')
    {!! Menu::render() !!}
@endsection

On your view blade file for frontend

@section('contents')
    {!! Menu::renderBootstrapNav('Brand Text','menu name','navbar-default') !!}
@endsection

Get Menu Items By Menu ID

use SoeurngSar\MenuBuilder\app\Facades\Menu;
...
/*
Parameter: Menu ID
Return: Array
*/
$menuList = Menu::get(1);

Get Menu Items By Menu Name

In this example, you must have a menu named Primary

use SoeurngSar\MenuBuilder\app\Facades\Menu;
...
/*
Parameter: Menu ID
Return: Array
*/
$menuList = Menu::getByName('Primary');

Using The Model

Call the model class

use SoeurngSar\MenuBuilder\app\Models\Menus;
use SoeurngSar\MenuBuilder\app\Models\MenuItems;

Credits

  • wmenu laravel package menu like wordpress

Compatibility

  • Tested with laravel 8.0 with Backpack version 4.0

统计信息

  • 总下载量: 111
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 4
  • 开发语言: JavaScript

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-11-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固