承接 phpcollective/menumaker 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

phpcollective/menumaker

Composer 安装命令:

composer require phpcollective/menumaker

包简介

An elegant multi level menu system for the Laravel framework.

README 文档

README

Latest Version on Packagist Software License Quality Score Total Downloads

Menu Maker is a nice and convenient way to manage your menu items for the Laravel framework. You can create multi level menu items for different sections of your site like Left Menu, Top Menu etc with it. It will provide the authorization of menu as well.

Structure

Directory structure of the project are as follows:

config/
public/        
resources/        
src/

Install

You may use Composer to install the package into your Laravel project:

$ composer require phpcollective/menumaker
Laravel 5.5+:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

PhpCollective\MenuMaker\MenuServiceProvider::class,

After installing Menu Maker, publish its assets using the menu:install Artisan command. It will publish all assets and configurations as well as run migrations related to menu maker.

$ php artisan menu:install

Add MenuMaker trait in User model.

<?php

namespace App;

use PhpCollective\MenuMaker\MenuMaker;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    use Notifiable, MenuMaker;
    
    ...
}

At this point you're all good to go. See Uses for how to get started with the package.

Usage

Accessing Package

By default all routes are prefixed with /menu-maker.

  • Users: /menu-maker/users
  • Roles: /menu-maker/roles
  • Sections: /menu-maker/sections
  • Menus: /menu-maker/menus
  • Permissions: /menu-maker/permissions

You can change this prefix by editing path in config/menu.php.

'path' => 'menu-maker'

Middleware

Menu Maker uses menu for middleware.

<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Auth::routes();

Route::middleware('menu')->group(function () {
    // Your routes will goes here
});

Credits

License

Laravel Menu Maker is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固