gabrieliuga/laravel-nova-sidebar-links 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

gabrieliuga/laravel-nova-sidebar-links

最新稳定版本:v1.0.5

Composer 安装命令:

composer require gabrieliuga/laravel-nova-sidebar-links

包简介

Allow definition of custom links on Laravel Nova sidebar.

README 文档

README

Build Status Quality Score Latest Version on Packagist StyleCI Total Downloads

Add links to your nova backend

Installation

You can install the package via composer:

composer require gabrieliuga/laravel-nova-sidebar-links

Usage

NovaServiceProvider.php
<?php

namespace App\Providers;

use Giuga\LaravelNovaSidebar\NovaSidebar;
use Giuga\LaravelNovaSidebar\SidebarGroup;
use Giuga\LaravelNovaSidebar\SidebarLink;

...

public function tools()
{
    return [
        (new NovaSidebar())
            ->addGroup((new SidebarGroup())
                ->setName('Utilities')
                ->addLink((new SidebarLink())
                    ->setName('Telescope')
                    ->setType('_blank')
                    ->setUrl('/telescope')
                )
                ->addLink((new SidebarLink())
                    ->setName('Horizon')
                    ->setType('_blank')
                    ->setUrl('/horizon')
                )
            )
        ->addLink((new SidebarLink())
            ->setUrl('https://google.com')
            ->setType('_blank')
            ->setName('Google')
        )
    ];
}

OR

public function tools()
{
    return [
        (new NovaSidebar())->hydrate([
            'Utilities' => [
                ['Telescope', '/telescope'],
                ['Horizon', '/horizon'],
                ['Google', 'https://google.com', '_self']
            ],
            'Google 2' => 'https://google.com'
        ])
    ];
}

The result of the above will be:

Laravel nova menu

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email me@iuga.dev instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 12
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-13