定制 brightly/mango 二次开发

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

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

brightly/mango

Composer 安装命令:

composer create-project brightly/mango

包简介

Brightly Mango CMS

README 文档

README

Mango (Ambient edition)

Intruduction

Install

As you started your project with brightly/mango-starter Mango is added to your composer.json, and prepared to use.

Migrations

Mango registers its own database migration files, so they'll be created as you run

artisan migrate

If you want to change something on those migration files, you can publish migration files, and edit them via:

artisan vendor:publish --tag=mango-migrations

Admin (Nova)

First you have to publish the Nova source code:

artisan vendor:publish --tag=mango-nova-dev

To be able to use the Nova you have to add these things to your composer.json:

    ...
    "require": {
        ...
        "laravel/nova": "*",
        "benjaminhirsch/nova-slug-field": "^1.2",
        ...
    },
    ...
    "repositories": [
        ...
        {
            "type": "path",
            "url": "./nova"
        },
        ...
    ],

...and then run:

composer update```
artisan nova:install
artisan vendor:publish --tag=mango-nova

...to create a default user:

artisan nova:user

Usage

Menu

Mango handling menus for site navigation: By handling multiple menus you can separate header, footer or main menu. Of course all of them can exists on different languages in an independent structure. Menus defined by a high level menu identifier, the type of these is menu. Above that we can define groups - groups - what can have more single items, and single items. Single items can handle different type of links:

  • url is for inside page links, Laravel's url(...) method will be applied on these.
  • href is a regular link to outside, we're not going to do anything with that. (This is for foreign links.)
  • route is for routes, what are defined by the developers. Laravel's route(...) method will be applied on this. This is good for changing locale, log in or log out functions.
Blade Functions

In Blade sitebuilders can use @menu('slug') conditional directive to check, whether the menu exists or not. Of course @else and @endmenu also exists. There is a global $menu variable in the templates as the @inject('menu', 'Brightly\Mango\Services\MenuService') Blade directive is used.

@menu('slug')
    // We have menu items
    @foreach ($menu->menu('slug')->items as $menu_item)
        <a href="{{ $menu_item->link }}">{{ $menu_item->title }}</a>
    @endforeach
@else
    //- There are no items in the menu.
@endmenu

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-12