定制 osaris-uk/navigation 二次开发

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

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

osaris-uk/navigation

最新稳定版本:1.4

Composer 安装命令:

composer require osaris-uk/navigation

包简介

Dynamic navigation package for Laravel

README 文档

README

Usage

After running the migrations you will need to publish the config file with:

php artisan vendor:publish --provider="OsarisUk\Navigation\NavigationServiceProvider" --tag="config"

Config

In the config you can define how many navigations you would like to set up and which views you would like them to be available to. You can also have multiple navigations available on the same view. The key is the view you would like the navigation to be avaliable to and the value is used to group the navigations:

    'navigations' => [
        '_layouts.partials.navigation' => 'main',
        'admin._layouts.partials.navigation' => [
            'admin',
            'admin_shortcuts'
        ],
    ],

Blade Implementation

Here is a simple example of a blade implementation:

    @foreach($navItems as $navItem)
    	@continue($navItem->realm !== 'admin') <!-- Select only 'admin' nav items where more than one group passed to the view. -->
    	
        @if (count($navItem['children']))
            <li class="has-child">
                <a href="{{ $navItem->route ? route($navItem->route) : '' }}{{ $navItem->target }}">{{ $navItem->title }}</a>
                <div class="dropdown left-indent">
                    <ul class="dropdown-items">
                        @foreach($navItem['children'] as $child)
                            <li>
                                <a href="{{ $child->route ? route($child->route) : '' }}{{ $child->target }}">{{ $child->title }}</a>
                            </li>
                        @endforeach
                    </ul>
                </div>
            </li>
        @else
            <li>
                <a href="{{ $navItem->route ? route($navItem->route) : '' }}{{ $navItem->target }}">{{ $navItem->title }}</a>
            </li>
        @endif
    @endforeach

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-12-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固